cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F427 SDRAM Support

karbach
Associate II
Posted on January 22, 2015 at 09:40

We already have a product which uses an STM32F427ZIT: For our latest development we are in need of an external RAM. It would be great to control an SDRAM that hosts 128Mbit of memory (Organization

2M word x 16 Bit x 4 Bank

). However we started to configure that 427 in STM32CUBEMX and it looks like it supports SDRAM. When I compile a test project in �Vision 5 and check the Debugger I only see FSMC in the peripheral view.

I searched a bit and only found examples using the STM32F429ZIT with external SDRAM (like the evaluation board). I was confused by this and checked the datasheet and there was no straight word on SDRAM support.

Different sources say that you need a 429/439 for SDRAM. I contacted my FAE but unfortunately he did not reply yet.

What is the common word on this issue? Will my 427 support SDRAM?

#sdram #sdram-solved
11 REPLIES 11
viteks
Associate II
Posted on March 15, 2016 at 17:40

Thank You clive1. PG2 not inited. Also soldered contacts memory chip and MCU. 32bits test was a bug.

Do You know other test of RAM? I would add ''running one'' and ''running zero''. my test code:

uint32_t i;
uint8_t * buff ;
uint8_t temp8,temp8_2;
uint16_t temp16, temp16_2;
uint32_t temp32, temp32_2;
uint8_t res=0;
printf
(
''8bit test start

''
);
buff = (uint8_t *)(RAM_BUF_BEGIN);
temp8=0;
for
(i=0;i<RAM_BUF_SIZE;i++)
{
*buff++ = temp8++;
}
buff = (uint8_t *)(RAM_BUF_BEGIN);
temp8=0;
for
(i=0;i<RAM_BUF_SIZE;i++,temp8++,buff++)
{
if
(( ((uint32_t)buff) & 0x3fff) == 0)
{
vTaskDelay(10);
if
(res!=0) 
break
;
printf
(
''%0

X''
,buff);
}
temp8_2 = *buff;
if
(temp8 != temp8_2)
{
res=1;
printf
(
''%0X:Readed %0X, stored %0X.

''
,buff,(uint32_t)temp8_2,(uint32_t)temp8);
}
}
if
(res==0) {
printf
(
''16bit test start

''
);
buff = (uint8_t *)(RAM_BUF_BEGIN);
temp16=0;
for
(i=0;i<RAM_BUF_SIZE/2;i++)
{
*(uint16_t *)buff = temp16;
buff +=2;
temp16++;
}
buff = (uint8_t *)(RAM_BUF_BEGIN);
temp16=0;
for
(i=0;i<RAM_BUF_SIZE/2;i++,temp16++,buff += 2)
{
if
(( ((uint32_t)buff) & 0xffff) == 0)
{
vTaskDelay(10);
if
(res!=0) 
break
;
printf
(
''%0

X''
,buff);
}
temp16_2 = *(uint16_t *)buff;
if
(temp16 != temp16_2)
{
res=1;
printf
(
''%0X:Readed %0X, stored %0X.

''
,buff,(uint32_t)temp16_2,(uint32_t)temp16);
}
}
}
if
(res==0) {
printf
(
''32bit test start

''
); 
buff = (uint8_t *)(RAM_BUF_BEGIN);
temp32=0;
for
(i=0;i<RAM_BUF_SIZE/4;i++)
{
*(uint32_t *)buff = temp32;
buff += 4;
temp32++;
}
buff = (uint8_t *)(RAM_BUF_BEGIN);
temp32=0;
for
(i=0;i<RAM_BUF_SIZE/4;i++)
{
if
(( ((uint32_t)buff) & 0xffff) == 0)
{
vTaskDelay(10);
if
(res!=0) 
break
;
printf
(
''%0

X''
,buff);
}
temp32_2 = *(uint32_t *)buff;
if
(temp32 != temp32_2)
{
res=1;
printf
(
''%0X:Readed %0X, stored %0X.

''
,buff,(uint32_t)temp32_2,(uint32_t)temp32);
}
temp32++;
buff += 4;
}
}
if
(res==0) {
printf
(
''Test successefull.

''
);
}
else
{
printf
(
''Test failed!

''
);
}

Posted on March 15, 2016 at 17:48

Do You know other test of RAM?

I use LFSR's to do saturation and retention tests.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..