Drawing a TGFX box widget in big screen (800x480) causing crash
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-05-28 1:42 PM
I try to add a very simple screen to my project. It always crashed when I try to add a box as background. It ends up with the infinite loop in startup assembly file.
Here is what I found so far:
- I can draw a smaller box(50x50).
- if I decrease speed of LTDC clock to a certain value, I can draw any size of box I want. But the screen gets flickering for the lower refresh rate.
I am using f7 and has set clock and SDRAM to maximum speed. Does anyone has similar issue? Is there any settings to improve this issue? Thanks in advance.
Solved! Go to Solution.
- Labels:
-
LCD-LTDC
-
STM32F7 Series
-
TouchGFX
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-06-03 2:21 AM
Hi @zzzzz​,
Is this a custom board? Have you checked your LTDC and DMA registers for errors?
A few things to try just to see if there are any improvements:
- hal.lockDMAToFrontPorch(true); //in boardconfiguration.cpp - Means DMA2D and TFT controller cannot access RAM at the same time, preventing memory contention issues (can cause flickering).
- Use NoDMA class (Boxes are drawn with DMA as well).
Let me know
/Martin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-06-03 2:21 AM
Hi @zzzzz​,
Is this a custom board? Have you checked your LTDC and DMA registers for errors?
A few things to try just to see if there are any improvements:
- hal.lockDMAToFrontPorch(true); //in boardconfiguration.cpp - Means DMA2D and TFT controller cannot access RAM at the same time, preventing memory contention issues (can cause flickering).
- Use NoDMA class (Boxes are drawn with DMA as well).
Let me know
/Martin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-06-06 2:08 PM
Thanks for your reply!
Yes, it is a custom board and it works well with STemWin before.
No error flag is set in LTDC or DMA2D registers.
I have tried hal.lockDMAToFrontPorch(true). It is not solve the issue.
Could you explain how to use NoDMA class? Does that mean I need modify STM32F7DMA.cpp?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-06-06 11:29 PM
Hi @zzzzz​,
You simply declare a different DMA class than the one you're using. Let me exemplify:
//BoardConfiguration.cpp
#include <touchgfx/hal/NoDMA.hpp>
//STM32F7DMA dma;
NoDMA dma;
STM32F7TouchController tc;
STM32F7Instrumentation mcuInstr;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-07-11 10:57 PM
@Martin KJELDSEN​
Sorry for using this thread.
I have a similar issue using the STM32F469I-DISCO and I have been looking into your suggestions
and the NoDMA solves my issue. The question now is what it means. What am I going
the chase to resolve the problem to reenable the DMA?
I’m using STM32CubeIDE 1.01.
Best regards
Thomas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-07-11 11:27 PM
Hi @TDahl​,
The F469I-DISCO should not have this issue. Locking the DMA to the front porch is a trick you can use if you've got issues with LTDC and DMA accessing the memory at the same time. In this case you can either slow down the application somewhat (lowering pixel clock, increasing porch areas within spec, locking DMA to front porch).
CubeIDE/CubeMX will not necessarily create the best configuration for TouchGFX. Try creating an application from our TouchGFX designer using the 469-DISCO applicaiton template and compare the configurations, maybe. It for sure works.
/Martin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-07-11 11:44 PM
Thanks @Martin KJELDSEN​
I will try that.
Thomas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-07-12 1:44 AM
For reference I seem to have solved the problem by halving the LCD-TFT clock because of double buffering. Thanks again @Martin KJELDSEN​
/Thomas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-07-12 2:53 AM
Awesome, Thomas!
