• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Embedded Software » WinCE » WinCE forum » LCD Driver query on TI Sitara EVK
Share
WinCE
  • Forum
Options
  • Subscribe via RSS

Forums

LCD Driver query on TI Sitara EVK

This question is answered
Jithendran Aravind
Posted by Jithendran Aravind
on Mar 24 2011 02:49 AM
Prodigy145 points

1.       Hi,

2.       We are using the TI Sitara AM37X Evaluation Module (EVM) Sitara from Mistral for developing a handheld device.The LCD in the kit has been replaced by a 24bit 4.3 inch NEC LCD(NL4827HC19-05B). The driver modifications are as follows:

1.The timing parameters were changed in the file lcd_vga.c

{   /*NEC_LCD_480H_272W */

      DISPC_PIXELFORMAT_RGB16,    //pixelFmt;

        480,                                    //width;

        272,                                    //height;

        40,                                     //hsw;

        1,                                      //hfp;

        1,                                      //hbp;

        1,                                     //vsw;

        0,                                      //vfp;

        0,                                      //vbp;

        1,                                      //logClkDiv;

        9,                                      //pixelClkDiv;

        (11 << 0),                              //dss1ClkSel;   

        0,                                      //loadMode;

        (DISPC_POL_FREQ_IVS | DISPC_POL_FREQ_IHS | DISPC_POL_FREQ_ONOFF),//polFreq;

        0x00000000,                 //lcdDefaultColor;

        0x00000000,                 //lcdTransColor;

        0x00000000,                 //tvDefaultColor;

        0x00000000,                 //tvTransColor;         

    },

2. changed the output format from 18 to 24 bit

           OUTREG32( &g_pDispRegs->DISPC_CONTROL,

                        DISPC_CONTROL_GPOUT1 |

                        DISPC_CONTROL_GPOUT0 |

                        DISPC_CONTROL_TFTDATALINES_24 |

                       // DISPC_CONTROL_TFTDATALINES_18 |

                        DISPC_CONTROL_STNTFT

                        );

 

3.changed the bitmask in file omap_ddge.cpp

case OMAP_DSS_PIXELFORMAT_RGB16:

            *pAlphaBitMask = 0xff000000;

            *pRBitMask     = 0x00ff0000;

            *pGBitMask     = 0x0000ff00;

            *pBBitMask     = 0x000000ff;

            bResult        = TRUE;

            break;

 

However  after booting  WinCE the display shows flicker. Any help or pointers to solve the issue  is highly appreciated.

Thanks,

Jithendran

http://www.nestgroup.net/

3.    The data sheet of the LCD available in the following link. minidevs.googlecode.com/files/NEC-NL4827HC19.pdf

 

 

 

Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Luan Le
    Posted by Luan Le
    on Jun 30 2011 13:44 PM
    Expert2270 points

    Hi Atul,

    Thanks a lot for a quick reply.  I am trying to understand a little bit about the display driver so that I can debug the issue.  One thing I don't understand is how it worked for Jithendran when he used RGB16 and the maskings

    case OMAP_DSS_PIXELFORMAT_RGB16:

                *pAlphaBitMask = 0xff000000;

                *pRBitMask     = 0x00ff0000;

                *pGBitMask     = 0x0000ff00;

                *pBBitMask     = 0x000000ff;

                bResult        = TRUE;

                break;

    I appreciate your insights on this.

    Besides using RGB32 instead of RGB16, would you please tell me what else I need to change to work with 24-bit LCD?  Should I set bits per pixel to 24 or 32?  The driver sets it to 32.

    Thanks,

    Luan

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Atul Verma
    Posted by Atul Verma
    on Jun 30 2011 15:14 PM
    Expert3690 points

    Use pixel format 16 or 32. Pixel format and LCD lines are different concepts - former controls how pixels are organized in framebuffer (more bpp will require more data movement and slower performance). Just because you have 24 bit LCD does not mean you have to use 24 bpp in representing data (really depends upon color range you want). See file lcd_vga.c - for DVI mode it sets up the controller in 24 bit mode but still uses 16 bpp pixel format. Here is what I would recommend:

    1. Leave pixel format as 16 bpp

    2. Verify timing parameters for your panel and modify code accordingly

    3. Just like DVI, setup controller for 24 bit lines

    Once you have this configuration working, then you can move to the next step of messing around with pixel format (if desired)

    Atul 


    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Luan Le
    Posted by Luan Le
    on Jun 30 2011 16:00 PM
    Expert2270 points

    Thanks Atul.  I understand the concepts better now.  Just to confirm with you - if I use pixel format as 16 bpp and 24 bit lines, I should be able to use the existing maskings as

    case

     

    OMAP_DSS_PIXELFORMAT_RGB16:

    *pAlphaBitMask = 0x0000;
    *pRBitMask = 0xf800;
    *pGBitMask = 0x07e0;
    *pBBitMask = 0x001f;
    bResult = TRUE;
    break;

    Thanks,

    Luan

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Atul Verma
    Posted by Atul Verma
    on Jun 30 2011 16:14 PM
    Expert3690 points

    yes - this is 5:6:5 format.

    Also refer to GFXREPLICATIONENABLE bit in DISPC_GFX_ATTRIBUTES register - if you set it to 1, controller will replicate MSB color bits into lower color lines otherwise they will remain 0 (since you have RGB16). Either way it should be fine but play around with it - if In understand this correctly, setting bit to 1 should give more intense color

    Atul 


    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Luan Le
    Posted by Luan Le
    on Jun 30 2011 17:00 PM
    Expert2270 points

    One more question - when I am using RGB16 with 24-bit lines, would you please tell me which data lines contain the RGB colors if I have GFXREPLICATIONENABLE set to 0?

    Thanks,

    Luan

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Tao Zhang
    Posted by Tao Zhang
    on Jul 01 2011 09:13 AM
    Expert4065 points

    Luan,

    DSS data lines are left aligned. This means the the upper bits(MSB part ) should be used. When GFXREPLICATIONENABLE is set to 0, the LSB part is filled up with 0s.

    RED: DSS_16(LSB) - DSS_23(MSB)

    GREEN: DSS_8(LSB) - DSS_15(MSB)

    BLUE: DSS_0(LSB) - DSS_7(MSB)

    Thanks,

    Tao

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
12
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use