2020-06-02 11:20 AM
I am following AN4861, and reading 4.5.2.
I have a 800x480 display, so I need the closest 64 byte multiple. 832
1) In CubeMX, DMA2D-Basic Parameters- DMA2D Output Offset. (832-800) = 32
2) In CubeMX, Additional Software-TouchGFX Width(LTDC) = 832
3) in main.c at end of MX_LTDC_INIT() add: HAL_LTDC_SetPitch(&hltdc, 832, 0);
Device config compile.
Touchgfx Generate code.
Project build.
With these changes it appears to work.
The Touchgfx editor now displays the 832 pixel screen.
Is this the correct configuration for implementing Optimized burst read accesses?
Thanks
Martin
2020-06-02 03:03 PM
Hi,
You're right to choose the closest multiple of 64 (832).
The Canvas does not need to be 832 - This would be weird since your display is only 800 px wide. As long as the underlying memory access is 64 byte aligned.
If you look at the STM32F769-DISCO (800x480 DSI) Application Template you'll notice that the end of refresh interrupt configures LTDC->CFBLR to be 832 wide. We actually transfer the framebuffer in two 448 wide chunks. Currently, CubeMX can't help us with TouchGFX configurations when display interface is DSI ("Custom").
/Martin
2020-06-03 08:44 AM
Hi Martin,
Yes it is weird for the canvas to be 832, Thats why I posed the question.
So using 832 will get the 64byte alignment.
With some weirdness (832 width) in the Designer, if you use CubeMX.
I will look at the example769-DISCO example
Thanks for the pointer.
Martin
Thanks
Martin
2020-06-04 12:02 AM
I won't rule out that you have to "adjust" some values after generating with CubeMX. It's difficult to abstract "rules" like these since normally, the width of the framebuffer matches the width of the canvas. Let me know how you do : )
2021-06-15 02:01 PM
Pulling the file "ApplicationTemplate.touchgfx.part into the editor and manually tweaking the screen width value after doing generate code inside CubeMX enabled editing without having to put up with that 32 pixel dead-zone in the editor.