2018-02-27 04:16 AM
I use STM32F429 witch display on 7inch LCD
This board's status was normal after display rectangle.
but something has problem during display rectangle with some flickering.
It has problem that use DMA2D or direct rambuffer too.
LCD model is 'at070tn94' 800*480
<Movie clip>
https://drive.google.com/file/d/1PE1mMioyWdtiboBF-62eS3ZK5IaWKJWg/view?usp=sharing
<Main>
HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init(); MX_FMC_Init(); MX_LTDC_Init(); MX_RTC_Init(); MX_USB_OTG_FS_USB_Init(); MX_SPI2_Init(); MX_DMA2D_Init(); MX_I2C2_Init(); MX_TIM3_Init(); MX_CRC_Init();/* USER CODE BEGIN 2 */
// Program the SDRAM external device SDRAM_Initialization_Sequence(&hsdram2, &command); HAL_Delay(200);//LCD GPIO
HAL_GPIO_WritePin(GPIOD, GPIO_PIN_13, GPIO_PIN_SET); //BACK LIGHT HAL_GPIO_WritePin(GPIOC, GPIO_PIN_6, GPIO_PIN_SET); //L_MODE TP_CS_H; for(testdma=0; testdma < 100; testdma++) { HAL_Delay(500); DMA2DFillBuffer(glCurrentLayer, glCurrentFrameBuffer, rand()%800, rand()%480, rand()%100, rand()%100, rand()%0xFFFFFF, DMA2D_RGB565); }<LCD setting>
LTDC_LayerCfgTypeDef pLayerCfg;
LTDC_LayerCfgTypeDef pLayerCfg1;hltdc.Instance = LTDC;
hltdc.Init.HSPolarity = LTDC_HSPOLARITY_AL; hltdc.Init.VSPolarity = LTDC_VSPOLARITY_AL; hltdc.Init.DEPolarity = LTDC_DEPOLARITY_AL; hltdc.Init.PCPolarity = LTDC_PCPOLARITY_IPC; hltdc.Init.HorizontalSync = 9; hltdc.Init.VerticalSync = 1; hltdc.Init.AccumulatedHBP = 45; hltdc.Init.AccumulatedVBP = 22; hltdc.Init.AccumulatedActiveW = 845; hltdc.Init.AccumulatedActiveH = 502; hltdc.Init.TotalWidth = 895; hltdc.Init.TotalHeigh = 525; hltdc.Init.Backcolor.Blue = 0; hltdc.Init.Backcolor.Green = 0; hltdc.Init.Backcolor.Red = 0; if (HAL_LTDC_Init(&hltdc) != HAL_OK) { _Error_Handler(__FILE__, __LINE__); }pLayerCfg.WindowX0 = 0;
pLayerCfg.WindowX1 = 800; pLayerCfg.WindowY0 = 0; pLayerCfg.WindowY1 = 480; pLayerCfg.PixelFormat = LTDC_PIXEL_FORMAT_RGB565; pLayerCfg.Alpha = 255; pLayerCfg.Alpha0 = 0; pLayerCfg.BlendingFactor1 = LTDC_BLENDING_FACTOR1_PAxCA; pLayerCfg.BlendingFactor2 = LTDC_BLENDING_FACTOR2_PAxCA; pLayerCfg.FBStartAdress = 0xD0000000; pLayerCfg.ImageWidth = 800; pLayerCfg.ImageHeight = 480; pLayerCfg.Backcolor.Blue = 0; pLayerCfg.Backcolor.Green = 0; pLayerCfg.Backcolor.Red = 0; if (HAL_LTDC_ConfigLayer(&hltdc, &pLayerCfg, 0) != HAL_OK) { _Error_Handler(__FILE__, __LINE__); }pLayerCfg1.WindowX0 = 0;
pLayerCfg1.WindowX1 = 800; pLayerCfg1.WindowY0 = 0; pLayerCfg1.WindowY1 = 480; pLayerCfg1.PixelFormat = LTDC_PIXEL_FORMAT_RGB565; pLayerCfg1.Alpha = 0; pLayerCfg1.Alpha0 = 0; pLayerCfg1.BlendingFactor1 = LTDC_BLENDING_FACTOR1_PAxCA; pLayerCfg1.BlendingFactor2 = LTDC_BLENDING_FACTOR2_PAxCA; pLayerCfg1.FBStartAdress = 0xD0000000 + 0xbb800; pLayerCfg1.ImageWidth = 800; pLayerCfg1.ImageHeight = 480; pLayerCfg1.Backcolor.Blue = 0; pLayerCfg1.Backcolor.Green = 0; pLayerCfg1.Backcolor.Red = 0; if (HAL_LTDC_ConfigLayer(&hltdc, &pLayerCfg1, 1) != HAL_OK) { _Error_Handler(__FILE__, __LINE__); }2018-02-27 07:22 AM
Hello,
To check if the problem here seems related to the hardware environment, you can exclude the two layers and display ONLY a BLUE background with Layers disabled.
What about your FMC configuration? FMC Bank1 is disabled or not ?
The FMC bank1 should be disabled if not used, the MPU should be set for the SDRAM as well…
Please have a look to the
application note with detailed examplesexplaining many important aspects such as display resolution compatibility and performances aspect. Also,
it may help you on how to configure the MPU in order to prevent graphical performance issues.Moreover, enabled the FIFO underrun interrupt is useful for determining the display size compatibility, this help you to detect display issue.
Please keep me informed about the progress on this.
Best Regards,
Imen.
2018-02-27 02:04 PM
I had a similar problem
https://arm-stm.blogspot.com/2017/04/stm32f746ng-discovery-ram-stemwin.html