Hello everyone,
I'm trying to connect an SPI ST7735S display to a Raspberry Pi Zero 2W running RetroPie 4.8 (based on Raspberry Pi OS Buster).
The display turns solid white (with some thin black lines) as soon as power is connected, and remains that way even when something should be displayed. I’m using fbcp-ili9341 to mirror the HDMI framebuffer to the SPI display. I’m aware that fbcp-ili9341 depends on DispmanX, which was removed in newer versions of Raspberry Pi OS, but since I’m using Buster (with RetroPie 4.8), DispmanX should still be supported.
I’ve previously used this same display with Arduino and it worked fine, so I doubt the display is broken.
This is how I connected the pins:These are the commands that I used to compile and run fbcp-ili9341
cmake .. \
-DST7735S=ON \
-DGPIO_TFT_DATA_CONTROL=25 \
-DGPIO_TFT_RESET_PIN=27 \
-DSPI_BUS_CLOCK_DIVISOR=6 \
-DSTATISTICS=0 \
-DUSE_DMA_TRANSFERS=OFF
make -j
sudo ./fbcp-ili9341
This is the output log:
~/fbcp-ili9341/build $ cmake .. \
> -DST7735S=ON \
> -DGPIO_TFT_DATA_CONTROL=25 \
> -DGPIO_TFT_RESET_PIN=27 \
> -DSPI_BUS_CLOCK_DIVISOR=6 \
> -DSTATISTICS=0 \
> -DUSE_DMA_TRANSFERS=OFF
CMake Warning (dev) in CMakeLists.txt:
No project() command is present. The top-level CMakeLists.txt file must
contain a literal, direct call to the project() command. Add a line of
code such as
project(ProjectName)
near the top of the file, but after cmake_minimum_required().
CMake is pretending there is a "project(Project)" command on the first
line.
This warning is for project developers. Use -Wno-dev to suppress it.
-- Doing a Release build
-- Board revision: 902120
CMake Warning at CMakeLists.txt:40 (message):
The board revision of this hardware is not known. Please add detection to
this board in CMakeLists.txt. (proceeding to compile against a generic
multicore CPU)
-- Using 4-wire SPI mode of communication, with GPIO pin 25 for Data/Control line
-- Using GPIO pin 27 for Reset line
-- Using GPIO pin 18 for backlight
-- Scaling source image to view. If the HDMI resolution does not match the SPI display resolution, this will produce blurriness. Match the HDMI display resolution with the SPI resolution in /boot/config.txt to get crisp pixel perfect rendering, or alternatively pass -DDISPLAY_CROPPED_INSTEAD_OF_SCALING=ON to crop instead of scale if you want to view the center of the screen pixel perfect when HDMI and SPI resolutions do not match.
-- Preserving aspect ratio when scaling source image to the SPI display, introducing letterboxing/pillarboxing if HDMI and SPI aspect ratios are different (Pass -DDISPLAY_BREAK_ASPECT_RATIO_WHEN_SCALING=ON to stretch HDMI to cover full screen if you do not care about aspect ratio)
-- SPI_BUS_CLOCK_DIVISOR set to 6. Try setting this to a higher value (must be an even number) if this causes problems. Display update speed = core_freq/divisor. (on Pi3B, by default core_freq=400). A safe starting default value may be -DSPI_BUS_CLOCK_DIVISOR=40
-- USE_DMA_TRANSFERS is disabled, this is not the most efficient mode. Try running CMake with -DUSE_DMA_TRANSFERS=ON to improve performance.
-- Targeting WaveShare 128x128 1.44inch LCD Hat with ST7735S controller
-- Configuring done
-- Generating done
-- Build files have been written to: /home/alerty/fbcp-ili9341/build
~/fbcp-ili9341/build $ make -j
[ 4%] Building CXX object CMakeFiles/fbcp-ili9341.dir/diff.cpp.o
[ 9%] Building CXX object CMakeFiles/fbcp-ili9341.dir/display.cpp.o
[ 14%] Building CXX object CMakeFiles/fbcp-ili9341.dir/fbcp-ili9341.cpp.o
[ 19%] Building CXX object CMakeFiles/fbcp-ili9341.dir/dma.cpp.o
[ 23%] Building CXX object CMakeFiles/fbcp-ili9341.dir/ili9488.cpp.o
[ 28%] Building CXX object CMakeFiles/fbcp-ili9341.dir/ili9486.cpp.o
[ 33%] Building CXX object CMakeFiles/fbcp-ili9341.dir/hx8357d.cpp.o
[ 38%] Building CXX object CMakeFiles/fbcp-ili9341.dir/gpu.cpp.o
[ 42%] Building CXX object CMakeFiles/fbcp-ili9341.dir/ili9341.cpp.o
[ 47%] Building CXX object CMakeFiles/fbcp-ili9341.dir/keyboard.cpp.o
[ 52%] Building CXX object CMakeFiles/fbcp-ili9341.dir/low_battery.cpp.o
[ 57%] Building CXX object CMakeFiles/fbcp-ili9341.dir/mem_alloc.cpp.o
[ 61%] Building CXX object CMakeFiles/fbcp-ili9341.dir/mailbox.cpp.o
[ 66%] Building CXX object CMakeFiles/fbcp-ili9341.dir/mpi3501.cpp.o
[ 71%] Building CXX object CMakeFiles/fbcp-ili9341.dir/mz61581.cpp.o
[ 76%] Building CXX object CMakeFiles/fbcp-ili9341.dir/spi.cpp.o
[ 80%] Building CXX object CMakeFiles/fbcp-ili9341.dir/ssd1351.cpp.o
[ 85%] Building CXX object CMakeFiles/fbcp-ili9341.dir/st7735r.cpp.o
[ 90%] Building CXX object CMakeFiles/fbcp-ili9341.dir/statistics.cpp.o
[ 95%] Building CXX object CMakeFiles/fbcp-ili9341.dir/text.cpp.o
[100%] Linking CXX executable fbcp-ili9341
[100%] Built target fbcp-ili9341
sudo ./fbcp-ili9341
bcm_host_get_peripheral_address: 0x3f000000, bcm_host_get_peripheral_size: 16777216, bcm_host_get_sdram_address: 0xc0000000
BCM core speed: current: 250000000hz, max turbo: 400000000hz. SPI CDIV: 6, SPI max frequency: 66666667hz
Initializing display
Resetting display at reset GPIO pin 27
Creating SPI task thread
InitSPI done
DISPLAY_FLIP_ORIENTATION_IN_SOFTWARE: Swapping width/height to update display in portrait mode to minimize tearing.
Relevant source display area size with overscan cropped away: 480x720.
Source GPU display is 480x720. Output SPI display is 130x129 with a drawable area of 128x128. Applying scaling factor horiz=0.18x & vert=0.18x, xOffset: 23, yOffset: 1, scaledWidth: 85, scaledHeight: 128
Creating dispmanX resource of size 85x128 (aspect ratio=0.664062).
GPU grab rectangle is offset x=0,y=0, size w=85xh=128, aspect ratio=0.664062
All initialized, now running main loop...
And the display is still white.
Here are some images that may help:
https://imgur.com/a/N8ZfvDC
Any suggestions or ideas would be appreciated.
Thanks in advance!
I'm trying to connect an SPI ST7735S display to a Raspberry Pi Zero 2W running RetroPie 4.8 (based on Raspberry Pi OS Buster).
The display turns solid white (with some thin black lines) as soon as power is connected, and remains that way even when something should be displayed. I’m using fbcp-ili9341 to mirror the HDMI framebuffer to the SPI display. I’m aware that fbcp-ili9341 depends on DispmanX, which was removed in newer versions of Raspberry Pi OS, but since I’m using Buster (with RetroPie 4.8), DispmanX should still be supported.
I’ve previously used this same display with Arduino and it worked fine, so I doubt the display is broken.
This is how I connected the pins:
Code:
GND - GroundVDD - 3.3 VSCL - GPIO 11 SCLKSDA - GPIO 10 MOSIRST - GPIO 27DC - GPIO 25CS - GPIO 8BLK - 3.3 Vcmake .. \
-DST7735S=ON \
-DGPIO_TFT_DATA_CONTROL=25 \
-DGPIO_TFT_RESET_PIN=27 \
-DSPI_BUS_CLOCK_DIVISOR=6 \
-DSTATISTICS=0 \
-DUSE_DMA_TRANSFERS=OFF
make -j
sudo ./fbcp-ili9341
This is the output log:
~/fbcp-ili9341/build $ cmake .. \
> -DST7735S=ON \
> -DGPIO_TFT_DATA_CONTROL=25 \
> -DGPIO_TFT_RESET_PIN=27 \
> -DSPI_BUS_CLOCK_DIVISOR=6 \
> -DSTATISTICS=0 \
> -DUSE_DMA_TRANSFERS=OFF
CMake Warning (dev) in CMakeLists.txt:
No project() command is present. The top-level CMakeLists.txt file must
contain a literal, direct call to the project() command. Add a line of
code such as
project(ProjectName)
near the top of the file, but after cmake_minimum_required().
CMake is pretending there is a "project(Project)" command on the first
line.
This warning is for project developers. Use -Wno-dev to suppress it.
-- Doing a Release build
-- Board revision: 902120
CMake Warning at CMakeLists.txt:40 (message):
The board revision of this hardware is not known. Please add detection to
this board in CMakeLists.txt. (proceeding to compile against a generic
multicore CPU)
-- Using 4-wire SPI mode of communication, with GPIO pin 25 for Data/Control line
-- Using GPIO pin 27 for Reset line
-- Using GPIO pin 18 for backlight
-- Scaling source image to view. If the HDMI resolution does not match the SPI display resolution, this will produce blurriness. Match the HDMI display resolution with the SPI resolution in /boot/config.txt to get crisp pixel perfect rendering, or alternatively pass -DDISPLAY_CROPPED_INSTEAD_OF_SCALING=ON to crop instead of scale if you want to view the center of the screen pixel perfect when HDMI and SPI resolutions do not match.
-- Preserving aspect ratio when scaling source image to the SPI display, introducing letterboxing/pillarboxing if HDMI and SPI aspect ratios are different (Pass -DDISPLAY_BREAK_ASPECT_RATIO_WHEN_SCALING=ON to stretch HDMI to cover full screen if you do not care about aspect ratio)
-- SPI_BUS_CLOCK_DIVISOR set to 6. Try setting this to a higher value (must be an even number) if this causes problems. Display update speed = core_freq/divisor. (on Pi3B, by default core_freq=400). A safe starting default value may be -DSPI_BUS_CLOCK_DIVISOR=40
-- USE_DMA_TRANSFERS is disabled, this is not the most efficient mode. Try running CMake with -DUSE_DMA_TRANSFERS=ON to improve performance.
-- Targeting WaveShare 128x128 1.44inch LCD Hat with ST7735S controller
-- Configuring done
-- Generating done
-- Build files have been written to: /home/alerty/fbcp-ili9341/build
~/fbcp-ili9341/build $ make -j
[ 4%] Building CXX object CMakeFiles/fbcp-ili9341.dir/diff.cpp.o
[ 9%] Building CXX object CMakeFiles/fbcp-ili9341.dir/display.cpp.o
[ 14%] Building CXX object CMakeFiles/fbcp-ili9341.dir/fbcp-ili9341.cpp.o
[ 19%] Building CXX object CMakeFiles/fbcp-ili9341.dir/dma.cpp.o
[ 23%] Building CXX object CMakeFiles/fbcp-ili9341.dir/ili9488.cpp.o
[ 28%] Building CXX object CMakeFiles/fbcp-ili9341.dir/ili9486.cpp.o
[ 33%] Building CXX object CMakeFiles/fbcp-ili9341.dir/hx8357d.cpp.o
[ 38%] Building CXX object CMakeFiles/fbcp-ili9341.dir/gpu.cpp.o
[ 42%] Building CXX object CMakeFiles/fbcp-ili9341.dir/ili9341.cpp.o
[ 47%] Building CXX object CMakeFiles/fbcp-ili9341.dir/keyboard.cpp.o
[ 52%] Building CXX object CMakeFiles/fbcp-ili9341.dir/low_battery.cpp.o
[ 57%] Building CXX object CMakeFiles/fbcp-ili9341.dir/mem_alloc.cpp.o
[ 61%] Building CXX object CMakeFiles/fbcp-ili9341.dir/mailbox.cpp.o
[ 66%] Building CXX object CMakeFiles/fbcp-ili9341.dir/mpi3501.cpp.o
[ 71%] Building CXX object CMakeFiles/fbcp-ili9341.dir/mz61581.cpp.o
[ 76%] Building CXX object CMakeFiles/fbcp-ili9341.dir/spi.cpp.o
[ 80%] Building CXX object CMakeFiles/fbcp-ili9341.dir/ssd1351.cpp.o
[ 85%] Building CXX object CMakeFiles/fbcp-ili9341.dir/st7735r.cpp.o
[ 90%] Building CXX object CMakeFiles/fbcp-ili9341.dir/statistics.cpp.o
[ 95%] Building CXX object CMakeFiles/fbcp-ili9341.dir/text.cpp.o
[100%] Linking CXX executable fbcp-ili9341
[100%] Built target fbcp-ili9341
sudo ./fbcp-ili9341
bcm_host_get_peripheral_address: 0x3f000000, bcm_host_get_peripheral_size: 16777216, bcm_host_get_sdram_address: 0xc0000000
BCM core speed: current: 250000000hz, max turbo: 400000000hz. SPI CDIV: 6, SPI max frequency: 66666667hz
Initializing display
Resetting display at reset GPIO pin 27
Creating SPI task thread
InitSPI done
DISPLAY_FLIP_ORIENTATION_IN_SOFTWARE: Swapping width/height to update display in portrait mode to minimize tearing.
Relevant source display area size with overscan cropped away: 480x720.
Source GPU display is 480x720. Output SPI display is 130x129 with a drawable area of 128x128. Applying scaling factor horiz=0.18x & vert=0.18x, xOffset: 23, yOffset: 1, scaledWidth: 85, scaledHeight: 128
Creating dispmanX resource of size 85x128 (aspect ratio=0.664062).
GPU grab rectangle is offset x=0,y=0, size w=85xh=128, aspect ratio=0.664062
All initialized, now running main loop...
And the display is still white.
Here are some images that may help:
https://imgur.com/a/N8ZfvDC
Any suggestions or ideas would be appreciated.
Thanks in advance!
Statistics: Posted by Alerty — Sun Jun 29, 2025 8:09 am — Replies 0 — Views 45