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

Advanced users • Re: How to write to SPI LCD directly, not via framebuffer?

$
0
0
I put st7796s.bin in /lib/firmware/ and the params below in config.txt:

Code:

dtparam=spi=ondtoverlay=mipi-dbi-spi,speed=48000000dtparam=compatible=st7796s\0panel-mipi-dbi-spidtparam=width=320,height=480,width-mm=49,height-mm=79dtparam=reset-gpio=27,dc-gpio=22,backlight-gpio=18dtoverlay=ads7846,speed=2000000,penirq=17,xmin=300,ymin=300,xmax=3900,ymax=3800,pmin=0,pmax=65535,xohms=400extra_transpose_buffer=2
It does bring up the display but the display seems to move it's base address by maybe a pixel on every frame refresh, so running my code gives the effect of sideways scrolling the display and a static screen with the cursor flashing eventually fills the display with multiple copies of the cursor! Any hints?

btw below is the display I'm testing with:
Image

(I also have these available: Image and Image)

Display-G may be a clone of https://www.waveshare.com/wiki/3.5inch_RPi_LCD_(G) but I can't be 100% sure.

dmesg at least confirms I'm picking up the new driver.

Code:

[    2.865665] ads7846 spi0.1: supply vcc not found, using dummy regulator[    2.865849] ads7846 spi0.1: touchscreen, irq 165[    2.866228] input: ADS7846 Touchscreen as /devices/platform/axi/1000120000.pcie/1f00050000.spi/spi_master/spi0/spi0.1/input/input1[    3.003558] panel-mipi-dbi-spi spi0.0: supply power not found, using dummy regulator[    3.003625] panel-mipi-dbi-spi spi0.0: supply io not found, using dummy regulator[    3.006213] [drm] Initialized panel-mipi-dbi 1.0.0 for spi0.0 on minor 0[    3.009710] panel-mipi-dbi-spi spi0.0: [drm] fb0: panel-mipi-dbid frame buffer device

Statistics: Posted by gtoal — Sat Nov 22, 2025 8:52 am



Viewing all articles
Browse latest Browse all 8374

Trending Articles