m5329 LCD TFT screen

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

m5329 LCD TFT screen

2,250 Views
cfernandez
Contributor I
Hi everyone,

I'm working with M5329EVB over Uclinux (linux-2-6-22-uc1) and latest version of LTIB. I get my TFT screen working and I also can execute the nanox examples. But it don't get a goot screen refresh and image quality it's not quite good.

I'm looking for increase my screen refresh rate but I haven't found it anywhere in linux/drivers/video/m532xfb.c it's any of the atttached options or I hace to modify some register else where?

Thanks.

static u32  fb_wait_params[][6]  = {
/* HWAIT1, HWIDTH, HWAIT2, VWAIT1, VWIDTH, VWAIT2  */
/* 640x480 */ {48,  14, 102, 32,  1, 35},
/* 800x600 */ {110, 59, 85,  42,  3, 24},
/* 240x320 */ {85,  10, 75,  32, 10, 10}
};

#if defined(CONFIG_LCD_640x480)
#define MODE_OPTION "640x480@60"
#define MODE_BPP 32
#define MODE_WIDTH 640
#define MODE_HEIGHT 480
#define MODE_VPW MODE_WIDTH
#define FB_WAIT_PARAMS(p) (fb_wait_params[0][(p)])
#define PIX_CLK_DIV 12
#define LCDC_LDCR_VALUE (MCF_LCDC_LDCR_TM(8) | MCF_LCDC_LDCR_HM(4))


Labels (1)
0 Kudos
5 Replies

635 Views
cfernandez
Contributor I
Thanks! Now screen it' working better. But not perfect (I have set PIX_CLK_DIV in 4) .

Theres another flag for finest adjust?
0 Kudos

636 Views
obidon
Contributor III
What LCD display are you using? Are you seeing overall flickering, periodic streaks across the display, color problems, or borders not right?
 
For the crossbar priority setting refer to chapter 12 of the reference manual. The following example will set the LCD controller to highest priority.
 
#define MCF_XBS_PRS1 (*(volatile unsigned int*)0xfc004100)
 
MCF_XBS_PRS1 = 0x65400213;
 
However, this is a trade off. You may have performance problems with networking or other issues.
 
0 Kudos

635 Views
cfernandez
Contributor I
Thanks, my LCD was already in 1st priority.

Everything it's working well, the problem it's that, now, i'm developing a nanox application and refresh between windows changes is very slow.

Could be possible that the fact of beeing on the same bus (RAM where i'm executing code and LCD controller) makes impossible to have a good screen refresh? Any other solutions avoiding nanox in order to get a good graphic interface?
0 Kudos

635 Views
obidon
Contributor III
If you don't need the full 18-bpp you can speed things up by setting the LCD controller to 16-bpp or 8-bpp. Because of padding for 18-bpp the bus has to transfer 32-bpp for every screen refresh. You would have to modify the display driver and recompile nano-X for different settings.
 
0 Kudos

635 Views
obidon
Contributor III
The PIX_CLK_DIV sets the refresh rate. The bus speed divided by this value is the refresh rate. Set the PIX_CLK_DIV to 3 for a good refresh on most displays. However if you see streaks on the display you may have to set the LCD controller to a higher priority on the crossbar module.
 
0 Kudos