Libraries for the STM32F746G Discovery screen?

All about boards manufactured by ST
Patrick
Posts: 22
Joined: Thu Dec 19, 2019 9:50 am
Answers: 2

Re: Libraries for the STM32F746G Discovery screen?

Post by Patrick »

Hello @fpiSTM,
There is a problem with the buffer allocation for the examples:

Code: Select all

 uint16_t *buffer = (uint16_t *)malloc(LTDC_F746_ROKOTECH.width * LTDC_F746_ROKOTECH.height);
Should be:

Code: Select all

 uint16_t *buffer = (uint16_t *)malloc(LTDC_F746_ROKOTECH.width * LTDC_F746_ROKOTECH.height  * sizeof(uint16_t));
 
The buffer allocated was half the size of the real one.
With this fix, it works well even without D_CACHE_DISABLED in build_opt.h.
I will not provide a PR as it is not an official repository.
User avatar
fpiSTM
Posts: 1723
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: Libraries for the STM32F746G Discovery screen?

Post by fpiSTM »

Hi @Patrick
Thanks. I will fix that.
Patrick
Posts: 22
Joined: Thu Dec 19, 2019 9:50 am
Answers: 2

Re: Libraries for the STM32F746G Discovery screen?

Post by Patrick »

Hi @fpiSTM,
Sorry, but it seems that apart the buffer fix, D_CACHE_DISABLED is still needed in normal use.
I have done some tests today;
  • With D_CACHE_DISABLED display is perfect with Adafruit_GFX standard tests.
  • Without D_CACHE_DISABLED there is display glitch with same tests.
Yesterday, I have done display tests with LVGL and DMA2D use.
In this case, D_CACHE_DISABLED is not needed.
User avatar
fpiSTM
Posts: 1723
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: Libraries for the STM32F746G Discovery screen?

Post by fpiSTM »

I've updated the branch. Thanks again for the feedback ;)
mlundin
Posts: 94
Joined: Wed Nov 04, 2020 1:20 pm
Answers: 6
Location: Sweden

Re: Libraries for the STM32F746G Discovery screen?

Post by mlundin »

If you want D_CACHE enabled the screen buffer can be cleared in the cache using

Code: Select all

 void SCB_CleanDCache_by_Addr( uint32_t * addr, int32_t dsize) 		 
Post Reply

Return to “STM boards (Discovery, Eval, Nucleo, ...)”