cancel
Showing results for 
Search instead for 
Did you mean: 

STM32Cube Bug Report - LTDC

ad
Associate
Posted on January 26, 2015 at 15:59

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 &sharp1166

Suggested 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-bug
1 REPLY 1
Posted on March 04, 2015 at 14:29

Hi denisov.alex,

Thanks for your feedback and this limitation will be fixed in next releases of F4.

Best regards,

Heisenberg.