Use LTDC with DSI on STM32L4R9
I have a custom board with an STM32L4R9 connected to a display (320x480) with internal GRAM over DSI. I've been successful in configuring and controlling the display using the HAL DSI API. Now I would like to use the LTDC to feed the DSI controller but have not been successful in getting anything to show up on the display.
The LTDC is configured with:
Display Type: RGB666 (18 bits) - DSI Mode
Layer 0 Pixel Format: RGB565 (corresponding to TouchGFX)
I'm trying to use the LTDC as follows:
uint16_t buf565[320*480];
for (uint32_t i = 0; i < (320 * 480); i++)
{
buf565[i] = 0x1f00;
}
LTDC_LayerCfgTypeDef pLayerCfg = {0};
pLayerCfg.WindowX0 = 0;
pLayerCfg.WindowX1 = 320;
pLayerCfg.WindowY0 = 0;
pLayerCfg.WindowY1 = 480;
pLayerCfg.PixelFormat = LTDC_PIXEL_FORMAT_RGB565;
pLayerCfg.Alpha = 0;
pLayerCfg.Alpha0 = 0;
pLayerCfg.BlendingFactor1 = LTDC_BLENDING_FACTOR1_CA;
pLayerCfg.BlendingFactor2 = LTDC_BLENDING_FACTOR2_CA;
pLayerCfg.FBStartAdress = (uint32_t) buf565;
pLayerCfg.ImageWidth = 320;
pLayerCfg.ImageHeight = 480;
pLayerCfg.Backcolor.Blue = 0;
pLayerCfg.Backcolor.Green = 0;
pLayerCfg.Backcolor.Red = 0;
HAL_LTDC_ConfigLayer(&hltdc, &pLayerCfg, 0);
HAL_DSI_Refresh(&hdsi);Any help in figuring out where I'm going wrong would be greatly appreciated!
