2015-01-26 06:59 AM
When displaying partial regions of a bitmap in a layer or when implementing layers that are partially off screen, it is important to be able to assign different values to the frame buffer pitch and the line length. Setting only WindowX/Y/0/1 parameters is not enough.
According to documentation, the lower 12 bits of CFBLR are defined as line length+3 this is not the same as frame buffer pitch. The current implementation (as of V1.2.0), is using pLayerCfg->ImageWidth to populate both fields within the CFBLR register which does not allow to specify individual values thus limiting the possible usage of layers in LTDC controller.Bug location: stm32f4xx_hal_ltdc.c (V1.2.0), implementation of LTDC_SetConfig, line &sharp1166Suggested fix: Replace:LTDC_LAYER(hltdc, LayerIdx)->CFBLR = (((pLayerCfg->ImageWidth * tmp) << 16) | ((
pLayerCfg->ImageWidth
* tmp) + 3));With:LTDC_LAYER(hltdc, LayerIdx)->CFBLR = (((pLayerCfg->ImageWidth * tmp) << 16) | (((
pLayerCfg->WindowX1 - pLayerCfg->WindowX0
) * tmp) + 3)); #stm32cube-ltdc-bug2015-03-04 05:29 AM
Hi denisov.alex,
Thanks for your feedback and this limitation will be fixed in next releases of F4.Best regards,Heisenberg.