I am submitting this question on behalf of a colleague:
Please can you help: on page 48 of the attached AN4861 application note - ST have a special warning about driving 480 x 272 displays as used in our system. They recommend the 480-pixel line length is padded to 512 pixels in SDRAM to ensure each line is a multiple of 128 to match the LDTC burst size and to prevent reads crossing the 1K boundary. Otherwise "the burst read will be split into single accesses which can lead to underun". This sounds like a plausible explanation for the shimmer bug we have been seeing.
ST provide some sample code which includes the following function call after the ConfigLayer call:
HAL_LTDC_SetPitch(&hltdc, 512, 0);
When I examine the Embedded Wizard generated code I am not seeing this SetPitch call.
The relevant code is located in ..\EWizard\STM32F429-Evalboard\TargetSpecific\ew_bsp_display.c
Please can you offer some advice on this.
a LTDC line has to be a multiple of 64 bytes (not pixels). So, it depends on the used color depth, if pad bytes are needed. Especially in case of the 3-byte color format RGB888 it is a little bit tricky, since you have to find a LTDC line length (in bytes) that's a multiple of 64 and a multiple of 3.
If you use a 2-byte color format (e. g. RGB565) a LTDC line of 480 should not be a problem (2 x 480 = 960 which is a multiple of 64). However, in case of a 3-byte color format, the line length has to be increased to 512 pixel to fulfill the rules described above.
Nevertheless, it's possible to experiment with other LTDC line lengths simply by changing the FRAME_BUFFER_WIDTH definition in ewconfig.h. This setting is directly used in ew_bsp_display.c for the layer configuration. The layer window size is set to FRAME_BUFFER_WIDTH x FRAME_BUFFER_HEIGHT there, HAL_LTDC_SetPitch() is not needed in this case in my opinion.
Ask Embedded Wizard
Welcome to the question and answer site for Embedded Wizard users and UI developers.
Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!