juj / fbcp-ili9341

A blazing fast display driver for SPI-based LCD displays for Raspberry Pi A, B, 2, 3, 4 and Zero
MIT License
1.62k stars 271 forks source link

Bus Error when running sudo ./fbcp-ili9341 #327

Open JohnKorte opened 6 months ago

JohnKorte commented 6 months ago

When i run the sudo ./fbcp-ili9341 command the screen gets a bit brighter but remains white. And i get a Bus Error.

pi@raspZero:~/fbcp-ili9341/build $ 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
Allocated DMA channel 7
Allocated DMA channel 1
Enabling DMA channels Tx:7 and Rx:1
Bus error

I am runng Bullseye on a raspberry pi zero 2w. Can someone please help me i just want to display the Desktop of the Raspi.

aviyall commented 6 months ago

same board same error bro. i have not find any solution yet

anmolss111 commented 3 months ago

I think in your case you might be passing the GPIO pin wrong.. I had the same issue. When building the connections with the GPIO pins just connect it according to hardware pin number.. but in the code snippent by the screen manual would have a python or c code for examples. In my case waveshare screen had the following code

Screenshot 2024-08-21 at 6 41 23 PM

The pin number in the code can be different from the hardware pin count.

While executing the cmake build command pass your software gpio pin count

for eg, mine cmake -DST7789=ON -DGPIO_TFT_DATA_CONTROL=25 -DGPIO_TFT_RESET_PIN=27 -DSPI_BUS_CLOCK_DIVISOR=8 -DUSE_DMA_TRANSFERS=OFF -DSTATISTICS=0 ..

even though my hardware pins i connected were different.

Screenshot 2024-08-21 at 6 45 45 PM

run raspi-config to set

SPI Interface in Interface Options -> SPI -> Enabled Enable the GL driver using Advanced options -> GL driver reboot build the fbcp with the -D driver on your LCD. I had a ST7789v with 320 and 240 aspect ratio so had to change C code refered in the issue.