cancel
Showing results for 
Search instead for 
Did you mean: 

Screen freezes when using both SDRAM and touchgfx enabled.

BA.1
Associate II

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.

12 REPLIES 12
MM..1
Chief III

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

lavanya
Associate III

@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

@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.

BA.1
Associate II

@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.  

BA.1
Associate II

Hello all ,to provide  update on the status of issuethe 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.CodeSnippet_onpauseCodeSnippet_onpauseDebuggerConsole_onpauseDebuggerConsole_onpauseDebugWindowDebugWindow

 

 

 

 

 

Thank you.

 

SofLit
ST Employee

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.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

Hello @BA.1 ,

Could you show us how you're putting your processing data in SDRAM? 

Osman SOYKURT
ST Software Developer | TouchGFX

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.

 

lavanya
Associate III

@BA.1  Have You checked Sdram  Timing memory cycles for 249 kbyes ?

as per datasheet memory timing cycles will change. 

 https://community.st.com/t5/stm32-mcus/how-to-set-up-the-fmc-peripheral-to-interface-with-the-sdram/ta-p/49457