LCD Color Shift on IMX51 EVK (under UBOOT)

cancel
Showing results for 
Search instead for 
Did you mean: 

LCD Color Shift on IMX51 EVK (under UBOOT)

397 Views
nmnz
Contributor I

Hi everybody,

 

I’m currently working on IMX51 Evaluation board with a LCD 3.5”, 240x320, from Hitachi (TX09D70VM1CCA).

I have downloaded and installed the last version of UBOOT (2009-08-imx_11.09.01) which support splash screen, and I tried to display a bmp image under uboot, using command: "bmp display [address]".

 

So I added in mx51_bbg.h, the following definition:

 

#define CONFIG_LCD_SPLASH_SCREEN                     (to allow splash screen at start up)

 

I changed some definitions to be adapted to my LCD Panel:


#define LCD_BPP  LCD_COLOR16                               

#define CONFIG_BMP_16BPP                                      (the input bmp file will be in 65536 colors)

 

My RGB image is in RGB565 bmp format (created with gimp).

 

In mx51_bbg.c, in ipuv3_fb_init function, the pixel format is configured to IPU_PIX_FMT_RGB666 (because LCD data bus is working in RGB666 => verified in correpsonding data sheet).

 

When I try to display an image, using the command “bmp display [address]” under uboot, I have an error : the global shape of the image is respected, the size also, but colors are not correct compared to the original file.

It seems that colors have been shifted.

 

To understand what is the problem I created 3 files with gimp in RGB565 format:

  • Red.bmp:     R=255, G=0,    B=0
  • Green.bmp:  R=0,    G=255, B=0
  • Blue.bmp:    R=0,    G=0,     B=255

I displayed each picture. For each file, the color is correct on the LCD panel, and data which are copied inside frame buffer are correct (I used a printf in lcd.c file to check what are the data sent to frame buffer using fb pointer).

 

Maybe I missed a specific register to configure or a definition to add, but I didn’t found any topics about this problem on different forums I visited.

 

Any ideas to solve this color shift problem ?

 

Thanks,

 

Nicolas

Tags (1)
0 Kudos
4 Replies

44 Views
nmnz
Contributor I

Hi Ray

 

The image seems correct but I had wrong:

  • Red file was displayed correctly
  • Green file vwas not displayed correctly => it was a light green
  • Blue file was not displayed correctly => it was a light blue

 

But I saw that only when I displayed the same image on a fully functional LCD panel

 

About the note on the schematic, my error  has been  to use the schematic of the adaptive board (internally made to connect my LCD on the EVK) instead of the EVK schematic, where this note was written.

I believed that the 18bits LCD bus on the EVK was fully functional without any modifications.

 

Regards,


0 Kudos

44 Views
Yanfei_Sun
Contributor IV

Dear Nicolas,

 

Thanks for sharing but I have a question on this. As you mentioned in the first email the image seems correct in display a pure R or G or B image. If the MSB 2bit of R component is tied to high, you would notice wrong image in rendering the pure G/B picuture, right?

Besides there is a note on the schematic, "POP R212and R214 if using DISP2_DAT16 and DISP2_DAT17 to have full 18-bit color support on dumb display." have you ever noticed that?

 

Just let more people know this and avoid duplicated debugging effort.

 

Best Regards,

Ray

0 Kudos

44 Views
daiane_angolini
NXP Employee
NXP Employee

Thanks a lot for sharing.

 

I'm sure it will help someone else in future.

0 Kudos

44 Views
nmnz
Contributor I

Hi all,

 

I finaly found the solution.

 

I had a color shift, because bit16 and bit 17 of LCD bus was setted to 1 all the time. So I had an intense red component on all picture I wanted to display.

 

Why I had bit16 and bit17 setted all the time ?

 

Here is the solution:

 

On the IMX51 EVK, disp 2 is limited to 16 bits. So to make it works in 18 bits mode, you must configure DISP1_DAT22 and DISP1_DAT23, in ALT5 mode in order to use them like DISP2_DAT16 and DISP2_DAT17.

 

BUT , you need to connect physically these 2 pins to the LCD output connector, puting some solder on 2 pads on the bottom part of the display connector.

 

This is not done when you receive your card.

 

Regards,


0 Kudos