5329evb/3.6 LCD kit - LCDC Graphic WIndow

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

5329evb/3.6 LCD kit - LCDC Graphic WIndow

2,144 Views
cr_tx
Contributor I
I have the display working, but can't seem to get the graphic window functionality going.  I am running the display in 16 bpp mode.

Here is the graphic window initialization code (to create a 64x64 graphic window):

    MCF_LCDC_LGWSAR = (unsigned long)videoMemoryGW;
    MCF_LCDC_LGWSR = MCF_LCDC_LGWSR_GWW(64/16) | MCF_LCDC_LGWSR_GWH(64);
    MCF_LCDC_LGWVPWR = 64/2;
    MCF_LCDC_LGWDCR = MCF_LCDC_LGWDCR_GWHM(4) | MCF_LCDC_LGWDCR_GWTM(8);

    MCF_LCDC_LGWPR = MCF_LCDC_LGWPR_GWXP(0) | MCF_LCDC_LGWPR_GWYP(0);

    MCF_LCDC_LGWCR = MCF_LCDC_LGWCR_GWAV(255) | MCF_LCDC_LGWCR_GWE;

The video memory area referenced is initialized to 0xFFFF (white).

Here are the register values as shown in the debugger:

LCD_GWSAR   0x400E894C
LCD_GWSR    0x00400040
LCD_GWVPW   0x00000020
LCD_GWPOR   0x00000000
LCD_GWPR    0x00000000
LCD_GWCR    0xFF400000
LCD_GWDCR   0x00040008

I am perplexed as to why the graphic window is not visible.  Is there anything outside the LCDC graphic window registers that must be configured to enable it?
Labels (1)
0 Kudos
2 Replies

388 Views
jlj
Contributor I

I'm also having the same issue with the graphic window.

 

I have the LCD controllerdisplaying images using the background window but I can't get the graphic window functionality to work at all.

 

The description in the reference manual seems simple enough but are there any special tricks to get the graphic window going?

 

Does anyone have a working code example using the graphic window?

 

 

0 Kudos

388 Views
jjvbsag
Contributor I
I can confirm this problem.
I'm using the cobra-board with a pcf5329 with an 8BPP-TFT display.
I've tried to generate a grafic cursor with the grapic window, but NOTHING is visible on the screen.

This is my relevant code:

w=32; // note W must be multiple of 16
  // must be multiple of 32 for B/W
 h=32;

 // grafic window address (just use rest behind normal screen)
 long addr=uint32(MCF_LCDC.ssar)+(CONFIG_DSP_H*LINE_LEN(CONFIG_DSP_W));
 // copy data to sdram (just use a pattern for test)
 //memcpy((void*)addr,cursor,sizeof(cursor));
 for(int n=0;n<w*h;++n)
  ((char*)addr)[n]=n;

 // setup registers
 MCF_LCDC.gwsar=addr;  // grafic window address
 MCF_LCDC.gwpor=0;  // panning offset
 // note w really should be (w>>4)<<20 but makes no diff
 MCF_LCDC.gwsr=(w<<16)|(h<<0); // grafic window size
 MCF_LCDC.gwdcr=(1<<31)|(8<<16)|(4<<0); // DMA settings
 MCF_LCDC.gwvpw=LINE_LEN(w)/4; // page width
 MCF_LCDC.gwpr=(x<<16)|(y<<0); // position
 const uint32 gwcr=0
   |(0xff<<24) // visible
   |(1<<23) // keying
   |(1<<22) // enable
   |(0<<21) // not revers
   |(0x3F<<12) // keying
   |(0x3F<<6) // keying
   |(0x3F<<0) // keying
   ;
 //
 if(MCF_LCDC.gwcr!=gwcr)
 {
  // see manual
  MCF_CCM.disable_lcd_clock(); // disable clock
  MCF_LCDC.gwcr=gwcr;
  MCF_CCM.enable_lcd_clock(); // enable clock
 }



0 Kudos