cancel
Showing results for 
Search instead for 
Did you mean: 

SDRAM data corruption

sanjeev majumdar
Associate III
Posted on July 16, 2018 at 08:00

Hi,

I am using stm32f769bit6 in my project. i have interfaced 32MB SDRAM using FMC. i want to use my sdram as datamemory as well as framebuffer. i did the sdram init @ systeminit() and provided the frame buffer address 0xC1000000 onwards. i would like to use sdram as datamemory from 0xc0000000 onwards. when i relocate my structure to sdram starting at 

0xc0000000 by providing section entry in .sct (linker file in keil), i could see my datastructure is relocated to that address onwards. when i am storing data in that strcuture, i observed some data corruption like if i store some name as 'EE_SERIAL_NUM' i am seeing sometimes it as 'EE_SERIAL_NUA' / 'EE_SERIAL_NU'. can anybody tell me what could be the issue. i also did memset before copying data but still sometimes data is getting corrupted on the other hand i could see my LCD is working properly images everything coming correctly (means LCD frame buffer is not corrupting data in data memory region of sdram.)

my structure look likes this 

typedef struct {

char paramName[50];

JsonVariant paramVal;

} stConfigParam;

typedef struct {

stConfigParam stSysInfo[NOOF_SYSINFO_PARAM];

stConfigParam stTchScrnInfo[NOOF_TSINFO_PARAM];

stConfigParam stInvInfo[NOOF_INVINFO_PARAM];

stConfigParam stStaticSwitchInfo[NOOF_STSWINFO_PARAM];

stConfigParam stInvStaticSwitchInfo[NOOF_INV_STSWINFO_PARAM];

stConfigParam stChgInfo[NOOF_CHGINFO_PARAM];

stConfigParam stBattHistLogInfo[NOOF_BATTHISTINFO_PARAM];

stConfigParam stBattTestLogInfo[NOOF_BATTTESTINFO_PARAM];

stConfigParam stBattInfo[NOOF_BATTINFO_PARAM];

stConfigParam stCommInfo[NOOF_COMMINFO_PARAM];

stConfigParam stSvcContactInfo[NOOF_SVCCONTINFO_PARAM];

stConfigParam stFerroInfo[NOOF_FERROINFO_PARAM];

stConfigParam stDispInfo[NOOF_DISPINFO_PARAM];

stConfigParam stAlrmInfo[NOOF_ALRMINFO_PARAM];

} stConfigurationData;

stConfigurationData            vrgstConfigurationData __attribute__((section('.sdram'))); /* Uninitialized Variable */

i have attached the .sct file for reference.

kindly help me to find out the reason for the issue

thanks

0 REPLIES 0