cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F7 LTDC Flickering

ekondratiev
Associate II
Posted on September 20, 2017 at 14:39

Hello! I've encountered a very strange bug with STM32F7 (767 and 746) LTDC. It seems, that FPU operations sometime cause LTDC flickering (sync miss or something). It rather difficult to debug this issue because the display flickers ocasionally and flickrs become rather rare under debuger step-by-step run. I've checked all interrupts and their priorities - everything is OK. Moreover, LTDC itself doen's use the interrupt. It just reads data from SDRAM and generates the scanning. In normal circumstancec it works absolutely clear.

But I've found the reason of the glitches for STM32F746. It is a double to float conversion function. But it happens not all the time. When I turned all ariphmetics to floats (added 'f' after all float constants, use sinf, cosf and other __f funtions) the flickering was gone.

Now I have the same issue on 767 (with double precision FPU). And here I can't solve the problem with just a single precision compilation.

I use FreeRTOS and 5 tasks and a lot of different peripherals (I2C, SPI, FMC, UART, GPIO, SDIO, timers and so). In both cases LTDC video memory is located in SDRAM connected thru FMC. I think that it could be reason of FreeRTOS task switching with FPU context. Moreover, it seems that display doesn't flicks (or flickrs very rare) when only 4 tasks run.

Can't imagine where I'm wrong and how to deal with it. Can somebody help me with that?

#stm32f7 #stm32f767 #stm32f746 #ltdc
11 REPLIES 11
Posted on April 02, 2018 at 14:22

 ,

 ,

Please ask new questions in a new thread

Normally code in SystemInit() to enable the co-processor

 , /* FPU settings ------------------------------------------------------------*/

 ,

 , ♯ if (__FPU_PRESENT == 1) &,&, (__FPU_USED == 1)

 ,

 , , , SCB->,CPACR |= ((3UL <,<, 10*2)|(3UL <,<, 11*2)), , /* set CP10 and CP11 Full Access */

 ,

 , ♯ endif

Typically a check-box in tools like Keil to enable the use/generation of FPU code and linking in libraries.

The F746 only supports single precision (FPU-S)

The processor is spec'd to run upto 216 MHz, the use of 100 MHz SDRAM may lower this ceiling to 200 MHz

The STM32H7 will run at upto 400 MHz, has the FPU-D supporting single and double precision floating point math.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on April 03, 2018 at 03:42

Dear

Turvey.Clive.002

,

I'll try to enable FPUwhich you toldwith me.

Thank you.