2020-04-17 03:38 AM
Hello everyone
Has anybody ever been successful in configuring STemWin library for external SRAM with STM32 MCUs?
(I struggling with this for a couple of months)
2020-04-17 05:39 AM
Are you using GNU based tools?
Have you thoroughly validated your external memory initialization, functionality, startup code and Linker script?
2020-04-17 05:39 AM
This should get basic operations going.
2020-04-17 08:16 AM
>>..Are you using GNU based tools?
I'm using STM32CubeIDE.
>>..Have you thoroughly validated your external memory initialization, functionality
Yes, I'm pretty sure that is working correctly. I can write any data (with different sizes and width) and read it back.
>>.. startup code
Should I modify the startup file?
>>.. and Linker script?
I have updated linker script so that linker place the GUI memory into the external SRAM.
2020-04-17 08:26 AM
I think if I can write to the entire addresses of the SRAM and read it back correctly, this two conditions are met. Am I right?
>>..3. Check that direct memory writes to the framebuffer produce a visible pattern on the display.
I do not know how to do this and I'm not using frambuffer. Currently I have wrote few code that it display a increasing progress bar. It works in the internal RAM very well but it fails when GUI memory is placed in the external memory.
2020-04-17 10:29 AM
Generally you'll need to modify the startup code to handle the initialization of external memory properly via the load regions you've described in the linker script. The SDRAM will need to be brought up early enough to allow the statics to be unpacked there.
You'll also probably want to manage the stack/heap so they can exist in two different memory regions, and fix the _sbrk() allocator to allow for that.
2020-04-18 01:45 PM
Do you have any example project for such a configuration, in any IDE?