cancel
Showing results for 
Search instead for 
Did you mean: 

The code generated by TouchGFX for the STM32H747I-DISCO conflicts with the reference manual

HNish.2
Associate II

Hi, everyone!

 

I am using the STM32H747I-DISCO.
While reviewing the code generated by TouchGFX Designer to use an external display, I noticed that the setting for LTDC_LxCFBLR contradicts the Reference Manual (RM0399, Rev. 4).
Regarding CFBLL[12:0], “33.7.23 LTDC layer x color frame buffer length register (LTDC_LxCFBLR)” states the following:

 

Bits 12:0 CFBLL[12:0]: Color frame buffer line length
These bits define the length of a single line of pixels in bytes + 7.
The line length is calculated as follows:
active-high width * number of bytes per pixel + 7.

 

On the other hand, in the HAL_DSI_EndOfRefreshCallback() function in TouchGFXHAL.cpp, lines 459 and 478 are as follows, adding 3 instead of 7

LTDC_LAYER(&hltdc, 0)->CFBLR = ((832 * 3) << 16) | ((REAL_WIDTH) * 3 + 3);

The STM32F429 reference manual describes CFBLL[12:0] as follows, which is why the value here is +3 instead of +7

 

Bits 12:0 CFBLL[12:0]: Color Frame Buffer Line Length
These bits define the length of one line of pixels in bytes + 3.
The line length is computed as follows: Active high width x number of bytes per pixel + 3.

 

I suspect this is due to differences in bus width caused by the core architecture, but is this code acceptable for use with the STM32H7?

1 REPLY 1
HNish.2
Associate II

Used version is as follows

TouchGFX Designer
v4.26.1