fbcp-ili9341 icon indicating copy to clipboard operation
fbcp-ili9341 copied to clipboard

(Help Needed ASAP) Display flashes black and some weirdly-colored pixels then goes back to white

Open qNnOtTk opened this issue 3 years ago • 1 comments

I tried to use fbcp-ili9341 with my tft display: https://www.adafruit.com/product/2050 that supports controller HX8357D, I did everything the readme page said, for some reason I had to add HX8357D into the CMakeLists.txt file because it wasn't added already, and when I execute "sudo ./fbcp-ili9341" in the folder build, it prints out some lines and then flashes black with discolored pixels, then goes back to white. Every retry has a different layout of discolored pixels, sometimes not even doing anything.

The first time I ever executed the command, I could see a hint of the terminal and the taskbar but it was all discolored and noisy.

This is what it prints out before the display acts weird: bcm_host_get_peripheral_address: 0xfe000000, bcm_host_get_peripheral_size: 25165824, bcm_host_get_sdram_address: 0xc0000000 BCM core speed: current: 200000000hz, max turbo: 500000000hz. SPI CDIV: 8, SPI max frequency: 62500000hz Allocated DMA channel 7 Allocated DMA channel 1 Enabling DMA channels Tx:7 and Rx:1 DMA hardware register file is at ptr: 0xb533d000, using DMA TX channel: 7 and DMA RX channel: 1 DMA hardware TX channel register file is at ptr: 0xb533d700, DMA RX channel register file is at ptr: 0xb533d100 Resetting DMA channels for use DMA all set up Initializing display Resetting display at reset GPIO pin 24 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: 768x1024. Source GPU display is 768x1024. Output SPI display is 320x480 with a drawable area of 320x480. Applying scaling factor horiz=0.42x & vert=0.42x, xOffset: 0, yOffset: 26, scaledWidth: 320, scaledHeight: 427 Creating dispmanX resource of size 320x427 (aspect ratio=0.749415). GPU grab rectangle is offset x=0,y=0, size w=320xh=427, aspect ratio=0.749415 All initialized, now running main loop...

If needed, I can send the fbcp-ili9341 folder I have on my rpi via mediafire. Need help ASAP.

qNnOtTk avatar Jul 22 '21 12:07 qNnOtTk

for some reason I had to add HX8357D into the CMakeLists.txt file because it wasn't added already

Adafruit HX8357D should already be present in the CMakeLists.txt:

https://github.com/juj/fbcp-ili9341/blob/486a32e7f23b41d49b0e9da4845a86709f6f9c8a/CMakeLists.txt#L202

then flashes black with discolored pixels, then goes back to white. Every retry has a different layout of discolored pixels,

This sounds like it could be the display panel hardware startup sequence. Some displays have their memory contain random pixel data at startup, then init sequence will clear the contents as the first rendered frame.

I could see a hint of the terminal and the taskbar but it was all discolored and noisy.

It could be due to driving the display too fast. Try a higher CDIV value, or try disabling DMA if that has an effect.

Also it is helpful to try out other display drivers/libraries/test code to verify whether the display panel is wired functionally.

juj avatar Aug 06 '21 08:08 juj