Hi everyone
I'm using STM32F103ZET to run STemWin532 GUI. In the first step i configured everything for running from internal RAM and program worked fine and GUI displayed components like progress bar and ...., but when i changed linker command file to map GUI memory to external SRAM GUI did not work. I checked connection with SRAM and it was OK. I checked 8,16,32 bit memory accessing integrity by following code:
main()
{
// initial codes
uint8_t static Var8[1000]__attribute__((section(".GUI_RAM")));//.GUI_RAM section is
uint16_t static Var16[1000]__attribute__((section(".GUI_RAM")));//located at external SRAM
uint32_t static Var32[1000]__attribute__((section(".GUI_RAM")));
uint8_t Read8[1000];
uint16_t Read16[1000];
uint32_t Read32[1000];
for(ii=0;ii<1000;ii++)
{
Var8[ii]=ii;
Var16[ii]=ii;
Var32[ii]=ii;
}
for(ii=0;ii<1000;ii++)
{
Read8[ii] = Var8[ii];
Read16[ii] = Var16[ii];
Read32[ii] = Var32[ii];
}
// other codes
}
Display More
We can write to External SRAM and read it back successfully.
I attached the STM32CubeIDE Build Analyzer Tool output for memory usage.
In this case (External SRAM) program runs GUI_Init() function successfully and memory allocation and LCD initialization are done, (The LCD is turn to black after GUI_Init() Execution just like when i use the internal RAM as GUI memory) but nothing else happens. Program then execute the following codes in the while(1) loop and screen remains black.
GUI_Init();
PROGBAR_Handle Progbar0;
Progbar0 = PROGBAR_Create(20, 80, 360, 80, WM_CF_SHOW);
PROGBAR_SetFont(Progbar0, &GUI_Font20B_ASCII);
int val=0;
while (1)
{
GUI_Delay(50);
if(val++>100) val = 0;
PROGBAR_SetValue(Progbar0, val);
}
Display More
I placed break point inside the while(1) to making sure that program is running.(Second attached file)
Thanks
Haia.B