Strange problem with STemWin Library

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Strange problem with STemWin Library

      Hello everyone
      I'm working on STemWin532 library on STM32F103ZET6 bord in STM32CudeIDE. I could successfully configured LCD interface (The Controller is HX8325B and GUI runs on internal RAM) and insert some text on the screen (image 1)

      But when i use external SRAM as GUI memory result is very strange and interesting :). The text is driven out of the screen. The picture 2 shows the situation.

      While the code is the same code that works correctly in the internal RAM of MCU. The only command that i changed is the following variable definition for GUI memory allocation:

      C Source Code: GUIConf.c

      1. #include "GUI.h"
      2. #define GUI_NUMBYTES 1024*50
      3. U32 static aMemory[GUI_NUMBYTES/4]; // This is for internal RAM
      4. U32 static aMemory[GUI_NUMBYTES/4]__attribute__((section(".GUI_0x68000000"))); // This is for extenal SRAM
      5. void GUI_X_Config(void) {
      6. GUI_ALLOC_AssignMemory(aMemory, GUI_NUMBYTES);
      7. }

      The section .GUI_0x68000000 is defined within linker command file as follows:



      C Source Code: Linker

      1. // other codes ...............
      2. /* Memories definition */
      3. MEMORY
      4. {
      5. RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 64K
      6. FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 512K
      7. ExtSRAM (xrw) : ORIGIN = 0x68000000, LENGTH = 1024K
      8. }
      9. /* Sections */
      10. SECTIONS
      11. {
      12. .GUI_0x68000000 :
      13. {
      14. } >ExtSRAM
      15. // other codes.......
      16. }
      Display All
      Build Analyzer output of CudeIDE shows the memory usage as image 3.

      There is no hard fault in execution procedure and while(1) loop is executing as normal:. (image 4)

      Any help will highly appreciated.
      Best Regards
      H.Boosa
      Images
      • 1.PNG

        664.82 kB, 775×433, viewed 85 times
      • 2.PNG

        599.64 kB, 854×330, viewed 82 times
      • 3.PNG

        17 kB, 703×220, viewed 76 times
      • 4.PNG

        19.9 kB, 695×381, viewed 74 times