cancel
Showing results for 
Search instead for 
Did you mean: 

Stemwin GUI not working for external SDRAM

development
Associate II
Posted on August 21, 2017 at 09:50

I have linked STemWin library. My project uses external SDRAM

When I display some progressbar or treeview or graph using internal RAM, value of progress is displayed correctlly (ex. 50%). Also treeview and graph is displayed correctly . When I am switching buffer 'aMemory' to extrernal SDRAM ( U32 aMemory[GUI_NUMBYTES / 4] __attribute__((section('.ExtRAMData')));) the value of progress is displayed strange value . Also display is flickering.

What is the problem  ?

if I check aMemory seperately then it is working ok as follows

 &sharpdefine GUI_NUMBYTES (1024) * 1024

U32 aMemory[GUI_NUMBYTES / 4] __attribute__((section('.ExtRAMData')));

uwWriteReadStatus=0;

for (uwIndex = 0; uwIndex < (GUI_NUMBYTES / 4); uwIndex++)

{

aMemory1[uwIndex] = uwIndex;

}

/* Read back data from the SDRAM memory */

for (uwIndex = 0; uwIndex < (GUI_NUMBYTES / 4); uwIndex++)

{

// if (0x87654321 != *(__IO uint32_t*) (SDRAM_BANK_ADDR + WRITE_READ_ADDR + 4*uwIndex))

if (uwIndex != aMemory1[uwIndex])

{

uwWriteReadStatus++;

}

}

I am getting 

uwWriteReadStatus as 0;That means it working.

I am using 8MB sdram with 32bit interface.

In .ld file following declaration is done

/* Specify the memory areas */

MEMORY

{

RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 192K

CCMRAM (rw) : ORIGIN = 0x10000000, LENGTH = 64K

FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 2048K

MEMORY_ARRAY1 (xrw) : ORIGIN = 0xC0200000, LENGTH = 2M

}

...

.ARM.attributes 0 : { *(.ARM.attributes) }

.ExtRAMData(NOLOAD) : {*(.ExtRAMData)} >MEMORY_ARRAY1

Regards,

Somnath Barge

#lcd-fliker #stemwin-stm32f429
11 REPLIES 11
Posted on August 28, 2017 at 07:05

How many frame buffers have been allocated...?

What is the location of aMemory ?

Posted on August 28, 2017 at 14:04

Hello !

''

I am using 8MB sdram with 32bit interface.

''

This means that if you try to access an address like 0xC0000002 you will get wrong results.

Any read or write to this memory is virtualy ANDed with 0xFFFFFFFC. The two LSbs are allways masked from FMC controller.

0690X00000607xjQAA.png

The internal MCU RAM conforms to this requirement  but your SDRAM not.

So you need to change  your memory configuration somehow to conform the STEMWin requirement.