This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

uboot阶段显示logo图片的问题?



各位大神:

       我使用的是am335x,7寸800*480显示屏,想在uboot阶段显示开机图片,

其中lcd原理图如下:

LCD初始化代码如下:

int Lcd_Init(void)
{
// MMUConfigAndEnable();

// CacheEnable(CACHE_ALL);

//IntMasterIRQEnable();

// IntAINTCInit();

// LCDAINTCConfigure();

//LCDBackLightEnable();

SetUpLCD();

/* Configuring the base ceiling */
RasterDMAFBConfig(LCDC_INSTANCE, (unsigned int)image_buf,(unsigned int)image_buf+ sizeof(image_buf) - 2,0);

RasterDMAFBConfig(LCDC_INSTANCE, (unsigned int)image_buf,(unsigned int)image_buf + sizeof(image_buf) - 2,1);

/* Enable End of frame0/frame1 interrupt */
RasterIntEnable(LCDC_INSTANCE, RASTER_END_OF_FRAME0_INT |RASTER_END_OF_FRAME1_INT);

/* Enable raster */
RasterEnable(LCDC_INSTANCE);
return 0;

}

并将SetUpLCD()下面红色部分进行对应的修改

static void SetUpLCD(void)
{
/* Enable clock for LCD Module */
LCDModuleClkConfig();

LCDPinMuxSetup();

/*
**Clock for DMA,LIDD and for Core(which encompasses
** Raster Active Matrix and Passive Matrix logic)
** enabled.
*/
RasterClocksEnable(LCDC_INSTANCE);

/* Disable raster */
RasterDisable(LCDC_INSTANCE);

/* Configure the pclk */
RasterClkConfig(LCDC_INSTANCE, 23040000, 192000000);

/* Configuring DMA of LCD controller */
RasterDMAConfig(LCDC_INSTANCE, RASTER_DOUBLE_FRAME_BUFFER,
RASTER_BURST_SIZE_16, RASTER_FIFO_THRESHOLD_8,
RASTER_BIG_ENDIAN_DISABLE);

/* Configuring modes(ex:tft or stn,color or monochrome etc) for raster controller */
RasterModeConfig(LCDC_INSTANCE, RASTER_DISPLAY_MODE_TFT_UNPACKED,
RASTER_PALETTE_DATA, RASTER_COLOR, RASTER_RIGHT_ALIGNED);


/* Configuring the polarity of timing parameters of raster controller */
RasterTiming2Configure(LCDC_INSTANCE, RASTER_FRAME_CLOCK_LOW |
RASTER_LINE_CLOCK_LOW |
RASTER_PIXEL_CLOCK_HIGH|
RASTER_SYNC_EDGE_RISING|
RASTER_SYNC_CTRL_ACTIVE|
RASTER_AC_BIAS_HIGH , 0, 255);

/* Configuring horizontal timing parameter */
RasterHparamConfig(LCDC_INSTANCE, 480, 4, 8, 43);

/* Configuring vertical timing parameters */
RasterVparamConfig(LCDC_INSTANCE, 272, 10, 4, 12);


RasterFIFODMADelayConfig(LCDC_INSTANCE, 128);

}

问题就是, Lcd_Init()初始函数里面黄色部分,bmp图片转换为数据怎么转换才能在7存lcd上显示?

我现在有一张24位深的800*480的bmp图片imagem.bmp,

运用startware下的/tools/bmpToRaster,装它拷贝到linux系统下,运行命令:./a.out 800 480 ./imagem.bmp ./image.h 24 BGR

请问用上面命令生成的图片能满足我的显示要求吗?

  • 其中,800*480已修改

    /* Configuring horizontal timing parameter */
    RasterHparamConfig(LCDC_INSTANCE, 800, 4, 8, 43);

    /* Configuring vertical timing parameters */
    RasterVparamConfig(LCDC_INSTANCE, 480, 10, 4, 12);