TI中文支持网
TI专业的中文技术问题搜集分享网站

C6748 LCD显示

TI 工程师:

你好:我现在在用C6748调试LCD 显示,RASTER  GRLIB  我在显示的时候,怎么不刷新, 我调用了GrStringDraw 函数,不是马上显示,必须在等操作一下buff_left 个缓存比如(memset,或者memcpy),但是我程序中,LCD没有任何的联系,这个buff_left只是我用于存储VP采集的图像。用于我自已经算法使用。

我是在BIOS下面调试的

2,还有一个问题是,我如何清屏,比如我显示完一条信息后,怎么清屏显示第二条信息,现在,我看着叠加的

Tony Tang:

Raster模式使能后,由LCD的DMA自动从buffer往LCD总线刷数据,跟是否操作没有关系。

关键的是buffer的配置要对,如调色板,另外就是LCD控制器的配置。

zyl steven:

回复 Tony Tang:

 //LCDs//Graphics context structuretContext g_sContext;#define TEXT_FONT               &g_sFontCmss22b#define TEXT_HEIGHT             (GrFontHeightGet(TEXT_FONT))#define BUFFER_METER_HEIGHT     TEXT_HEIGHT#define BUFFER_METER_WIDTH      150#define LCD_SIZE 614400#define LCD_CLK  150000000#define PALETTE_SIZE 32#define LCD_WIDTH 800#define LCD_HEIGHT 480#define PALETTE_OFFSET 4 // Memory that is used as the local frame buffer. #if defined(__IAR_SYSTEMS_ICC__) #pragma data_alignment=4 unsigned char g_pucBuffer[GrOffScreen16BPPSize(LCD_WIDTH, LCD_HEIGHT)]; #elif defined __TMS470__ || defined _TMS320C6X #pragma DATA_ALIGN(g_pucBuffer, 4); unsigned char g_pucBuffer[GrOffScreen16BPPSize(LCD_WIDTH, LCD_HEIGHT)]; #else unsigned char g_pucBuffer[GrOffScreen16BPPSize(LCD_WIDTH, LCD_HEIGHT)]__attribute__ ((aligned (4))); #endif // The graphics library display structure. tDisplay g_sVGA480x480x16Display; // 32 byte Palette. unsigned short palette_32b[PALETTE_SIZE/2] =  {0x4000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u,   0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u};

 unsigned int buffcount = 0, buffcount2,display_buff_1=0;volatile unsigned int captured = 0, processed = 1 , nIrisDna = 0;unsigned char *buff_luma1 = NULL;unsigned char *buff_luma2 = NULL;#ifdef _VERT_SPLIT_WITH_DMAunsigned char *buff_left = NULL;unsigned char *buff_right = NULL;void (*cb_Fxn[EDMA3_NUM_TCC])(unsigned int tcc,                               unsigned int status, void *appData);volatile int irqRaised;#endifunsigned char *buff_luma[2]; 

/* Setup LCD */ SetUpLCD();

if (SetUpVPIFRx() == 0) { //UARTprintf("agan>> VPIF initialized successfully\r\n"); } else { //UARTprintf("agan>> VPIF initialized failed\r\n"); }

/* configuring the base ceiling *//* RasterDMAFBConfig(SOC_LCDC_0_REGS, (unsigned int)image1, (unsigned int)image1 + sizeof(image1) – 2, 0);

RasterDMAFBConfig(SOC_LCDC_0_REGS, (unsigned int)image1, (unsigned int)image1 + sizeof(image1) – 2, 1);*/ /* configuring the base ceiling */ RasterDMAFBConfig(SOC_LCDC_0_REGS, (unsigned int)(g_pucBuffer+PALETTE_OFFSET), (unsigned int)(g_pucBuffer+PALETTE_OFFSET) + sizeof(g_pucBuffer) – 2 – PALETTE_OFFSET, 0);

RasterDMAFBConfig(SOC_LCDC_0_REGS, (unsigned int)(g_pucBuffer+PALETTE_OFFSET), (unsigned int)(g_pucBuffer+PALETTE_OFFSET) + sizeof(g_pucBuffer) – 2 – PALETTE_OFFSET, 1);

src = (unsigned char *) palette_32b; dest = (unsigned char *) (g_pucBuffer+PALETTE_OFFSET); for( i = 4; i < (PALETTE_SIZE+4); i++) { *dest++ = *src++; } GrOffScreen16BPPInit(&g_sVGA480x480x16Display, g_pucBuffer, LCD_WIDTH, LCD_HEIGHT);

// Initialize a drawing context. GrContextInit(&g_sContext, &g_sVGA480x480x16Display);

/* enable End of frame interrupt */ RasterEndOfFrameIntEnable(SOC_LCDC_0_REGS);

/* enable raster */ RasterEnable(SOC_LCDC_0_REGS);

//Clear Screen

sRect.sXMin = 0; sRect.sYMin = 0; sRect.sXMax = 799; sRect.sYMax = 479; GrContextForegroundSet(&g_sContext, ClrWhite); GrRectFill(&g_sContext, &sRect); // // Fill the top 24 rows of the screen with blue to create the banner. // sRect.sXMin = 0; sRect.sYMin = 0; sRect.sXMax = GrContextDpyWidthGet(&g_sContext) – 1; sRect.sYMax = 35; GrContextForegroundSet(&g_sContext, ClrDarkBlue); GrRectFill(&g_sContext, &sRect);

// // Put a white box around the banner. // GrContextForegroundSet(&g_sContext, ClrWhite); GrRectDraw(&g_sContext, &sRect); // // Put the application name in the middle of the banner. // GrContextFontSet(&g_sContext, &g_sFontCm20); GrStringDrawCentered(&g_sContext, "usb-dev-serial", -1, GrContextDpyWidthGet(&g_sContext) / 2, 10, 0);

// // Show the various static text elements on the color STN display. // GrContextFontSet(&g_sContext, TEXT_FONT);

GrStringDraw32(&g_sContext, "工号:", -1, 150, 105, true); GrStringDraw32(&g_sContext, "姓名:", -1, 150, 185, true); GrStringDraw32(&g_sContext, "部门:", -1, 150, 265, true); GrStringDraw32(&g_sContext, "时间:", -1, 150, 340, true);

user3564350:

回复 Tony Tang:

我也遇到类似问题了,必须对VPIF的DMA数据进行处理,不然LCD输出就显示混乱。两种讲道理是没有任何联系的,难度是C6748的bug。求解答。

Tony Tang:

回复 user3564350:

user3564350我也遇到类似问题了,必须对VPIF的DMA数据进行处理,不然LCD输出就显示混乱。两种讲道理是没有任何联系的,难度是C6748的bug。求解答。

赞(0)
未经允许不得转载:TI中文支持网 » C6748 LCD显示
分享到: 更多 (0)