2017-09-20 05:39 AM
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 #ltdc2018-04-02 07:22 AM
,
,
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 */,
, ♯ endifTypically 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.
2018-04-02 08:42 PM
Dear
Turvey.Clive.002
,I'll try to enable FPUwhich you toldwith me.
Thank you.