Page 2 of 2

Re: Libraries for the STM32F746G Discovery screen?

Posted: Tue Nov 03, 2020 1:27 pm
by Patrick
Hello [mention]fpiSTM[/mention],
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.

Re: Libraries for the STM32F746G Discovery screen?

Posted: Tue Nov 03, 2020 4:15 pm
by fpiSTM
Hi [mention]Patrick[/mention]
Thanks. I will fix that.

Re: Libraries for the STM32F746G Discovery screen?

Posted: Wed Nov 04, 2020 10:40 am
by Patrick
Hi [mention]fpiSTM[/mention],
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.

Re: Libraries for the STM32F746G Discovery screen?

Posted: Wed Nov 04, 2020 1:20 pm
by fpiSTM
I've updated the branch. Thanks again for the feedback ;)

Re: Libraries for the STM32F746G Discovery screen?

Posted: Wed Nov 04, 2020 2:22 pm
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)