Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8013

Troubleshooting • Getting inverted display when interfacing ILI9341 with Raspberry Pi 3B

$
0
0
I am running Raspberry Pi OS Lite (without GUI) on a Raspberry Pi 3B and have connected a generic ILI9341 display to the GPIO. I am getting inverted display, and I reckon that I am going wrong somewhere.

Code:

 Static hostname: zeroview.gridhead.net       Icon name: computer      Machine ID: e7e622d112dd4f8d886d5097324903ca         Boot ID: bb6c3b80a8be4ad9b6c5c72577a91957Operating System: Debian GNU/Linux 13 (trixie)          Kernel: Linux 6.12.47+rpt-rpi-v8    Architecture: arm64
This is what my

Code:

/boot/firmware/config.txt
file looks like.

Code:

# For more options and information see# http://rptl.io/configtxt# Some settings may impact device functionality. See link above for details# Uncomment some or all of these to enable the optional hardware interfaces#dtparam=i2c_arm=on#dtparam=i2s=ondtparam=spi=on# Enable audio (loads snd_bcm2835)dtparam=audio=on# Additional overlays and parameters are documented# /boot/firmware/overlays/README# Automatically load overlays for detected camerascamera_auto_detect=1# Automatically load overlays for detected DSI displays# display_auto_detect=1display_auto_detect=0# Automatically load initramfs files, if foundauto_initramfs=1# Enable DRM VC4 V3D driverdtoverlay=vc4-kms-v3ddtoverlay=fbtft,spi0-0,ili9341,speed=32000000,dc_pin=24,reset_pin=25,led_pin=18,framebuffer_width=320,framebuffer_height=240,rotation=270max_framebuffers=2# Don't have the firmware create an initial video= setting in cmdline.txt.# Use the kernel's default instead.# disable_fw_kms_setup=1# Run in 64-bit modearm_64bit=1# Disable compensation for displays with overscandisable_overscan=1# Run as fast as firmware / board allowsarm_boost=1[cm4]# Enable host mode on the 2711 built-in XHCI USB controller.# This line should be removed if the legacy DWC2 controller is required# (e.g. for USB device mode) or if USB support is not required.otg_mode=1[cm5]dtoverlay=dwc2,dr_mode=host[all]gpu_mem=16
This is what my

Code:

/boot/firmware/cmdline.txt
file looks like.

Code:

console=serial0,115200 console=tty1 root=PARTUUID=c925ee63-02 rootfstype=ext4 fsck.repair=yes rootwait cfg80211.ieee80211_regdom=IN fbcon=map:10
This is what my

Code:

/etc/modprobe.d/fbtft.conf
file looks like.

Code:

options fbtft_device name=ili9341
This is what my

Code:

/etc/modules-load.d/fbtft.conf
file looks like.

Code:

spi-bcm2835fbtft_device
Here are some useful outputs.

Code:

$ lsmod | grep fb

Code:

fb_ili9341             12288  0fbtft                  49152  2 fb_ili9341backlight              24576  3 drm_kms_helper,fbtft,drm

Code:

$ dmesg | grep fb

Code:

[    0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_headphones=0 cgroup_disable=memory snd_bcm2835.enable_headphones=1 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_hdmi=0  vc_mem.mem_base=0x3f000000 vc_mem.mem_size=0x3f600000  console=ttyS0,115200 console=tty1 root=PARTUUID=c925ee63-02 rootfstype=ext4 fsck.repair=yes rootwait cfg80211.ieee80211_regdom=IN fbcon=map:10[    0.052779] raspberrypi-firmware soc:firmware: Firmware hash is cd866525580337c0aee4b25880e1f5f9f674fb24[    1.429923] simple-framebuffer 3ef53000.framebuffer: fb0: simplefb registered![    9.275616] fbtft: module is from the staging directory, the quality is unknown, you have been warned.[    9.320943] fb_ili9341: module is from the staging directory, the quality is unknown, you have been warned.[    9.358784] fb_ili9341 spi0.0: fbtft_property_value: buswidth = 8[    9.358814] fb_ili9341 spi0.0: fbtft_property_value: fps = 30[    9.737873] graphics fb1: fb_ili9341 frame buffer, 240x320, 150 KiB video memory, 16 KiB buffer memory, fps=31, spi0.0 at 32 MHz
The display appears inverted and about 20% of the screen is either black, white or distorted (basically, that part is unusable). I have checked (and rechecked) if I messed up with the GPIO ports and they seem to be all correct.
TMVDEFSJ.jpg
Any help is appreciated!

Statistics: Posted by Akashdeep Dhar — Thu Nov 06, 2025 8:05 am



Viewing all articles
Browse latest Browse all 8013

Trending Articles