STM32F429驱动7寸屏

2019-07-21 00:47发布

最近在stm32f429 discover板上驱动7寸屏(800X480),stm32f429内部带屏的驱动器LTDC,之前在r板上运行网上的emwin很正常,但是屏幕是2.4寸的,现在改为7寸屏,可以显示但是显示的尺寸跟分辨率不对,我的相关配置如下,这个问题让我纠结好久了,希望知道的大大给我指点一下,不胜感激,必有重谢!
另附图片 [mw_shl_code=c,true]#define LCD_PIXEL_WIDTH ((uint16_t)800) #define LCD_PIXEL_HEIGHT ((uint16_t)480) #define HSW ((uint16_t)48) /* Horizontal synchronization */ #define HBP ((uint16_t)40) /* Horizontal back porch */ #define HFP ((uint16_t)40) /* Horizontal front porch */ #define VSW ((uint16_t)3) /* Vertical synchronization */ #define VBP ((uint16_t)29) /* Vertical back porch */ #define VFP ((uint16_t)13) /* Vertical front porch */ #define HSTART (HBP) #define HSTOP (LCD_PIXEL_WIDTH+HSTART) #define VSTART (VBP) #define VSTOP (LCD_PIXEL_HEIGHT+VSTART) #define LCD_FRAME_BUFFER ((uint32_t)0xD0000000) //LCD?????????×???·?????·SDRAM #define BUFFER_OFFSET ((uint32_t)0x60000) void LCD_Init(void)函数中: RCC_PLLSAIConfig(192, 7, 4); RCC_LTDCCLKDivConfig(RCC_PLLSAIDivR_Div2);//RCC_PLLSAIDivR_Div8 /* Enable PLLSAI Clock */ RCC_PLLSAICmd(ENABLE); /* Wait for PLLSAI activation */ while(RCC_GetFlagStatus(RCC_FLAG_PLLSAIRDY) == RESET) { } //?±?ò?????????????ó????×??? /* Timing configuration */ /* Configure horizontal synchronization width */ LTDC_InitStruct.LTDC_HorizontalSync = HSW-1; /* Configure vertical synchronization height */ LTDC_InitStruct.LTDC_VerticalSync = VSW-1; /* Configure accumulated horizontal back porch */ LTDC_InitStruct.LTDC_AccumulatedHBP = HBP-1; /* Configure accumulated vertical back porch */ LTDC_InitStruct.LTDC_AccumulatedVBP = VBP-1; /* Configure accumulated active width */ LTDC_InitStruct.LTDC_AccumulatedActiveW = LCD_PIXEL_WIDTH + HBP-1; /* Configure accumulated active height */ LTDC_InitStruct.LTDC_AccumulatedActiveH = LCD_PIXEL_HEIGHT + VBP-1; /* Configure total width */ LTDC_InitStruct.LTDC_TotalWidth = LCD_PIXEL_WIDTH + HBP + HFP-1; /* Configure total height */ LTDC_InitStruct.LTDC_TotalHeigh = LCD_PIXEL_HEIGHT + VBP + VFP-1; LTDC_Init(&LTDC_InitStruct); static void _LCD_InitController(int LayerIndex) 函数中: xSize = LCD_GetXSizeEx(LayerIndex); ySize = LCD_GetYSizeEx(LayerIndex); LTDC_Layer_InitStruct.LTDC_HorizontalStart = HSTART; LTDC_Layer_InitStruct.LTDC_HorizontalStop = (xSize + HSTART-1); LTDC_Layer_InitStruct.LTDC_VerticalStart = VSTART; LTDC_Layer_InitStruct.LTDC_VerticalStop = (ySize + VSTART-1);[/mw_shl_code] [mw_shl_code=c,true] [/mw_shl_code]
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
该问题目前已经被作者或者管理员关闭, 无法添加新回复
18条回答
maodewen
1楼-- · 2019-07-21 02:55
 精彩回答 2  元偷偷看……
maodewen
2楼-- · 2019-07-21 03:51
回复【8楼】simms01:
---------------------------------
非常感谢,可以正常显示了,是硬件问题
正点原子
3楼-- · 2019-07-21 09:17
帮顶。。。。
maodewen
4楼-- · 2019-07-21 12:07
回复【2楼】正点原子:
---------------------------------
感谢原子哥,不知道你有没有用过stm32f429或者驱动过7寸屏?
rgzdb
5楼-- · 2019-07-21 12:38
 精彩回答 2  元偷偷看……
maodewen
6楼-- · 2019-07-21 13:25
 精彩回答 2  元偷偷看……

一周热门 更多>