Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

please help..the driver code works, but screen is inverted (reversed) #221

Open
cherbin opened this issue Jul 29, 2021 · 4 comments
Open

Comments

@cherbin
Copy link

cherbin commented Jul 29, 2021

Hi I have the driver compiled and running. It works fine in the default landscape mode.

I commented out the // #define DISPLAY_OUTPUT_LANDSCAPE

When I run ./fbcp-ili9341 , the screen comes up in portrait mode, but it is backwards (inverted), like a mirror image (the text is backwards).

rotate options wont fix it because that will only rotate it.. I need to reverse the actual image.

How do I fix this ?

Thanks

./fbcp-ili9341
bcm_host_get_peripheral_address: 0x20000000, bcm_host_get_peripheral_size: 33554432, bcm_host_get_sdram_address: 0x40000000
BCM core speed: current: 300000000hz, max turbo: 400000000hz. SPI CDIV: 12, SPI max frequency: 33333333hz
Allocated DMA channel 7
Allocated DMA channel 1
Enabling DMA channels Tx:7 and Rx:1
DMA hardware register file is at ptr: 0xb4b3d000, using DMA TX channel: 7 and DMA RX channel: 1
DMA hardware TX channel register file is at ptr: 0xb4b3d700, DMA RX channel register file is at ptr: 0xb4b3d100
Resetting DMA channels for use
DMA all set up
Initializing display
Resetting ili9488 display at reset GPIO pin 27
InitSPI done
Relevant source display area size with overscan cropped away: 720x480.
Source GPU display is 720x480. Output SPI display is 320x480 with a drawable area of 320x480. Applying scaling factor horiz=0.44x & vert=1.00x, xOffset: 0, yOffset: 0, scaledWidth: 320, scaledHeight: 480
Creating dispmanX resource of size 320x480 (aspect ratio=0.666667).
GPU grab rectangle is offset x=0,y=0, size w=320xh=480, aspect ratio=0.666667
All initialized, now running main loop...

@cherbin cherbin changed the title please help..the driver code works, but screen is reversed. please help..the driver code works, but screen is inverted (reversed) Jul 29, 2021
@juj
Copy link
Owner

juj commented Aug 6, 2021

Try toggling either the column address order swap, or the row address order swap in MADCTL register. See

#define MADCTL_COLUMN_ADDRESS_ORDER_SWAP (1<<6)

@facelesstech
Copy link

Hi, I'm in the same boat. What do you mean by toggling? Do I comment out each line then recompile? I'm using a 2.8" ili9488 screen if that helps

@gkhngkce
Copy link

gkhngkce commented Jun 6, 2023

For Kedei 3.5inch tft display I solved this problem by adding display_rotate=0x10000 to bottom of /boot/config.txt
ps: to be sure do not reboot cut the power from raspberry and plug it again.

@obdbeats
Copy link

For Kedei 3.5inch tft display I solved this problem by adding display_rotate=0x10000 to bottom of /boot/config.txt ps: to be sure do not reboot cut the power from raspberry and plug it again.

what version of kedei you got?? cause i'm trying to set-up a kedei v5.0 into a raspberrypi 4 and i cant put it to work! 😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants