Skip to main content
karbach
Associate II
January 22, 2015
Question

STM32F427 SDRAM Support

  • January 22, 2015
  • 11 replies
  • 2213 views
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
    This topic has been closed for replies.

    11 replies

    Tesla DeLorean
    Guru
    January 22, 2015
    Posted on January 22, 2015 at 11:38

    The

    http://www.st.com/web/catalog/mmc/FM141/SC1169/SS1577/LN1789/PF253573

    and data sheet says it does.

    The 427 does not support the TFT-LCD option. The SDRAM would be part of the FMC

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    karbach
    karbachAuthor
    Associate II
    January 22, 2015
    Posted on January 22, 2015 at 11:47

    That sounds great. I'm still wondering why µVision does not display the FMC of the 427 then. I can only access the FSMC. Maybe it's just a typo on their side. I'm curious to see what my FAE says.

    Tesla DeLorean
    Guru
    January 22, 2015
    Posted on January 22, 2015 at 11:53

    I'm still wondering why µVision does not display the FMC of the 427 then.

    A conversation to be had with Keil Support, probably just a oversight in the target database.
    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    Montassar BEN ROMDHANE_O
    Visitor II
    January 22, 2015
    Posted on January 22, 2015 at 14:30

    Hi,

    After discussion with STM32CubeMX team, it turned out that this limitation (missing FMC in view register) related to the toolchain itself, and not the generated project by STM32CubeMX tool.

    Regards,

    Heisenberg.

    karbach
    karbachAuthor
    Associate II
    January 22, 2015
    Posted on January 22, 2015 at 14:58

    Okay that makes sense to me. I had a look at KEIL's SVD files that come with the DFP. Version 1.0.8 and even the latest 2.2.0 does not have a FMC menu item in the debugger. I informed them to check their toolchain.

    viteks
    Visitor II
    March 12, 2016
    Tesla DeLorean
    Guru
    March 12, 2016
    Posted on March 12, 2016 at 14:03

    Honestly this seems off-topic, and should have been in a new thread.

    The data suggests you have some of the Dx lines shorted, and you seems to be at least two address bits short on the address bus.

    You'd need to review the schematic/design.

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    viteks
    Visitor II
    March 13, 2016
    Posted on March 13, 2016 at 18:38

    I found 1 short.

    The board has no other shorts.

    Log and my shematic in attach. (8bit, 16bit, 32bit).

    I checked availability signal by oscilloscope (bandwidth 70MHz: I know that not good, but...).

    I change all time settings by +1 (exlude LoadToActiveDelay): same result.

    Excuse me for my English.

    ________________

    Attachments :

    ram_log_130316.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0it&d=%2Fa%2F0X0000000bcy%2FA5KM3afDYWVOC_QhCXcHNCaFFTUCV0Mr4ZxIEsZdXHo&asPdf=false
    Tesla DeLorean
    Guru
    March 13, 2016
    Posted on March 13, 2016 at 21:20

    Seem to totally miss configuring PG2 as A12, might perhaps explain writing 0x2003 to +0x0003

    The schematic data side is cropped, would look for open circuit or continuity of D13 (PD8)

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    viteks
    Visitor II
    March 15, 2016
    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!
    
    ''
    );
    }