Дискавери, emWin не использую. Попробовать не обещаю, хотел было попробовать 800х600 - с лету не пошло, разбираться не стал. clk=25MHz
#define PIXEL_WIDTH ((uint16_t)640)
#define PIXEL_HEIGHT ((uint16_t)480)
#define HOR_SYNC_TIME 96
#define VER_SYNC_TIME 2
#define HOR_BACK_PORCH 40
#define VER_BACK_PORCH 25
#define HOR_FRONT_PORCH 8
#define VER_FRONT_PORCH 2
/* Polarity configuration */
/* Initialize the horizontal synchronization polarity as active low */
LTDC_InitStruct.LTDC_HSPolarity = LTDC_HSPolarity_AL;
/* Initialize the vertical synchronization polarity as active low */
LTDC_InitStruct.LTDC_VSPolarity = LTDC_VSPolarity_AL;
/* Initialize the data enable polarity as active low */
LTDC_InitStruct.LTDC_DEPolarity = LTDC_DEPolarity_AL;
/* Initialize the pixel clock polarity as input pixel clock */
LTDC_InitStruct.LTDC_PCPolarity = LTDC_PCPolarity_IIPC;
/* Configure R,G,B component values for LCD background color */
LTDC_InitStruct.LTDC_BackgroundRedValue = 0;
LTDC_InitStruct.LTDC_BackgroundGreenValue = 0;
LTDC_InitStruct.LTDC_BackgroundBlueValue = 0;
/* Timing configuration */
/* Configure horizontal synchronization width */
LTDC_InitStruct.LTDC_HorizontalSync = HOR_SYNC_TIME-1;
/* Configure vertical synchronization height */
LTDC_InitStruct.LTDC_VerticalSync = VER_SYNC_TIME-1;
/* Configure accumulated horizontal back porch */
LTDC_InitStruct.LTDC_AccumulatedHBP = HOR_SYNC_TIME + HOR_BACK_PORCH - 1;
/* Configure accumulated vertical back porch */
LTDC_InitStruct.LTDC_AccumulatedVBP = VER_SYNC_TIME + VER_BACK_PORCH - 1;
/* Configure accumulated active width */
LTDC_InitStruct.LTDC_AccumulatedActiveW = HOR_SYNC_TIME + HOR_BACK_PORCH + PIXEL_WIDTH - 1;
/* Configure accumulated active height */
LTDC_InitStruct.LTDC_AccumulatedActiveH = VER_SYNC_TIME + VER_BACK_PORCH + PIXEL_HEIGHT - 1;
/* Configure total width */
LTDC_InitStruct.LTDC_TotalWidth = HOR_SYNC_TIME + HOR_BACK_PORCH + PIXEL_WIDTH + HOR_FRONT_PORCH - 1;
/* Configure total height */
LTDC_InitStruct.LTDC_TotalHeigh = VER_SYNC_TIME + VER_BACK_PORCH + PIXEL_HEIGHT + VER_FRONT_PORCH - 1;
// LAYER1
LTDC_Layer_InitStruct.LTDC_HorizontalStart = HOR_SYNC_TIME + HOR_BACK_PORCH;
LTDC_Layer_InitStruct.LTDC_HorizontalStop = (PIXEL_WIDTH + HOR_SYNC_TIME + HOR_BACK_PORCH - 1);
LTDC_Layer_InitStruct.LTDC_VerticalStart = VER_SYNC_TIME + VER_BACK_PORCH;
LTDC_Layer_InitStruct.LTDC_VerticalStop = (PIXEL_HEIGHT + VER_SYNC_TIME + VER_BACK_PORCH - 1);
/* Pixel Format configuration*/
LTDC_Layer_InitStruct.LTDC_PixelFormat = LTDC_Pixelformat_RGB565;
/* Alpha constant (255 totally opaque) */
LTDC_Layer_InitStruct.LTDC_ConstantAlpha = 255;
/* Default Color configuration (configure A,R,G,B component values) */
LTDC_Layer_InitStruct.LTDC_DefaultColorBlue = 0;
LTDC_Layer_InitStruct.LTDC_DefaultColorGreen = 0;
LTDC_Layer_InitStruct.LTDC_DefaultColorRed = 0;
LTDC_Layer_InitStruct.LTDC_DefaultColorAlpha = 0;
/* Configure blending factors */
LTDC_Layer_InitStruct.LTDC_BlendingFactor_1 = LTDC_BlendingFactor1_CA;
LTDC_Layer_InitStruct.LTDC_BlendingFactor_2 = LTDC_BlendingFactor2_CA;
LTDC_Layer_InitStruct.LTDC_CFBLineLength = ((PIXEL_WIDTH * BYTE_PER_PIXEL) + 3);
LTDC_Layer_InitStruct.LTDC_CFBPitch = (PIXEL_WIDTH * BYTE_PER_PIXEL);
LTDC_Layer_InitStruct.LTDC_CFBLineNumber = PIXEL_HEIGHT; /* Configure the number of lines */
/* Start Address configuration : the LCD Frame buffer is defined on SDRAM */
LTDC_Layer_InitStruct.LTDC_CFBStartAdress = FRAME_BUFFER1;
LTDC_LayerInit(LTDC_Layer1, <DC_Layer_InitStruct); /* Initialize LTDC layer 1 */
/********** Configure Layer2 *********/
LTDC_Layer_InitStruct.LTDC_CFBStartAdress = FRAME_BUFFER2;
/* Configure blending factors */
LTDC_Layer_InitStruct.LTDC_BlendingFactor_1 = LTDC_BlendingFactor1_PAxCA;
LTDC_Layer_InitStruct.LTDC_BlendingFactor_2 = LTDC_BlendingFactor2_PAxCA;
LTDC_LayerInit(LTDC_Layer2, <DC_Layer_InitStruct); /* Initialize LTDC layer 2 */
ПыСы. Поначалу сам принял за помеху - смешение картинки первого и второго слоев.