2023-09-13 06:44 AM
Hi all,
I am using STM32H7B3I-DK board with touchgfx and freeRTOS enabled for display.
I require large buffer size approximate to 774Kbytes or 0.74MB for data processing . Internal RAM indicates fully used.
Hence I have enabled SDRAM for storing and processing data. SDRAM works fine, but display freezes after few seconds of execution , then after using reset button on board again display starts and freezes after few minutes.
The duration of working is not consistent but the duration does not exceed 3 minutes.
IF SDRAM is disabled , everything touchgfx ,display all works fine , but memory is highly required .
There are two concepts which I have analyzed and have doubts on it
1) if SDRAM is enabled , may be task execution time is more comparatively , how to increase the task delay if so ?
2) I have read the touchgfx documentation from their website which says touchgfx uses internal RAM for storage , hence have question that if touchgfx used SDRAM aslo?
Please kindly provide your support and guide me to resolve the issue ,I am going to almost cross the deadline and no where near the solution .
Thank you.
2023-09-13 07:04 AM
Sorry , but your message lack complete profesional info. How you change ram use. Why you dont use debuger and see where freeze ... How you enable SDRAM ... isnt simple process
2023-09-14 05:36 AM - edited 2023-09-29 09:45 PM
@BA.1 I think Framebuffer data is storing in internal RAM only.
Have you changed linker file to store framebuffer in SDRAM section?
Have you given Framebuffer to store at SDRAM address in CUBEIDE LTDC Framebuffer configuration?
See changes before commenting and after commenting SDRAM in Build Analyzer -> Memory regions & Memory details
2023-10-02 11:06 PM
@lavanya Firstly Thank you for your reply and sorry for my late reply .I went through your suggestion , and checked framebuffer location assigned in CubeMX as well as linker file , as you said , it is stored in internal RAM only , hence it is clear that frame buffer for now has nothing to do with SDRAM usage ,now frame buffer location is out of the topic for display freeze issue.
2023-10-02 11:14 PM
@MM..1 Sorry for not being clear as I am new to this, I specified all possible reasons I know that might cause the display freeze based on weeks of analyzing ,so thinking people out there might have little more info around the issue.
2023-10-03 12:37 AM
Hello all ,to provide update on the status of issue - the issue still persists , as per @MM..1 suggestion , I tried debugging the code ,but the freeze does not occur immediate after display initialization or after specific time of execution .It is random, hence when display stops responding (freeze condition),I paused the debugging , the control is in "configASSERT() " line inside bool STM32TouchController::sampleTouch(int32_t& x, int32_t& y)function in STM32TouchController.cpp file.
For n number of debug process -debug ->display freeze->pause ,the control is always at same line specified above.
Hence, I shall restate the issue by eliminating frame buffer concept and other few details in a simplified manner-
ISSUE : When 61,440 DWords(245Kbytes) of SDRAM is used ,there is no issue with process, but when 62,464 DWords(249Kbytes) of SDRAM is used , display freezes or in other words display neither responds to touch nor executes main thread(display does not change as per expected function which is what I referred as freeze condition).
Does memory access time causing the issue?
I have attached images of debugger console and debugger track . Please kindly provide support to resolve this issue at earliest.
Thank you.
2023-10-03 01:43 AM - edited 2023-10-03 06:29 AM
Hello,
It smells the CM7 speculative access behavior.
Please refer to the AN4861 "LCD-TFT display controller (LTDC) on STM32 MCUs" / Section 4.6 Special recommendations for Cortex-M7 (STM32F7/H7)..
You can also watch this video on youtube.
2023-10-03 07:15 AM
Hello @BA.1 ,
Could you show us how you're putting your processing data in SDRAM?
2023-10-04 11:45 PM
Hello @Osman SOYKURT
Start Address is declared as macro
Start Address is 0xD0000000 to 0xD00BD000
For write :
uint32_t Addrs =0,Data=234;//iCnt is initialized in for loop
Addrs = StartAddress+(iCnt*4);
*(uint32_t*)Addrs = Data;
For Read:
Addrs = StartAddress+(iCnt*4);
Data = *(uint32_t*)Addrs;
Thank you.
2023-10-05 12:32 AM
@BA.1 Have You checked Sdram Timing memory cycles for 249 kbyes ?
as per datasheet memory timing cycles will change.