Skip to main content
Msolinas
Senior
September 8, 2023
Solved

Hardware mistake and LTDC remapping solution wanted!

  • September 8, 2023
  • 14 replies
  • 4670 views

Hello everyone, I have a big problem with the hardware. I designed the hardware before dealing with the Cubemx. Starting from a circuit that worked, I mistakenly thought that giving the system RGB666 from RGB888 meant giving bits 0 to 6 R0...R6, G0..G6, B0..B6. I then connected the two bits of the display R0, R1, G0, G1, B0 B1 to ground, as shown in the figure. But I have the problem that everything is wrong.Is it possible to remap LTDC so I can see everything properly?

Thanks for your help.Disp Schematic.png

 

dispConn.png

 

This topic has been closed for replies.
Best answer by MM..1

Simply in MX wizard change ltdc layer 0 to L8 and same touchgfx buff to L8 and regenerate target.

14 replies

Msolinas
MsolinasAuthor
Senior
September 9, 2023

Ok, I understand that this is not possible to do on the LTDC, I just read the datasheet, but it is instead possible to manipulate the color file on touchgfx, but I would have to override the setBitmap(const Bitmap& bmp) function similar to readBMP24File and shifting the pixels, it would Is a similar solution possible or not? premise, I set the HW as RGB888 and it works and then deinitialized the x6 and x7 pins of the RGB, and everything goes, now the color needs to be shifted downwards by two bits per color.

Msolinas
MsolinasAuthor
Senior
September 9, 2023

Ok, update: one part of problem solved changing file color.hpp, now the hard part is intercept ware the bitmap for widget is loaded and shift rgb, there is someone can help? can't find this in code.  I can be very grateful for this, I have a demo and can't change hardware in this moment...

thanks.

MM..1
Super User
September 9, 2023

LTDC is hw based transfer , you cant manipulate it, but you can change framebuffer data before LTDC use it.

Issue is speed and size of lcd. For example 320x240 you can simple change data in buffer, but for big displays MCU dont have power todo.

Msolinas
MsolinasAuthor
Senior
September 10, 2023

Ok very strange, this depend from order in touchgfx add screen, as you can see, if I change the order, it appair or not.. 

base.pngIMG_20230910_145242897.jpgIMG_20230910_145123542.jpg

MM..1
Super User
September 10, 2023

I dont see way. I work with touchgfx more as 5 years from ver 4.10 and every release have own "buggs"...

Too you dont write how you correct palete array. You can see this in target generated c files. L8 is indexed RGB888 format.

Msolinas
MsolinasAuthor
Senior
September 10, 2023

I'v no corrected array, this is result by default. I found the problem for text scretch and was in RAM buffer config. Do you mean LCD8bpp_CLUT? thanks for your intrest.