Skip to main content
Eric Lin
Associate II
November 29, 2018
Question

Can the external SDRAM address 0xD0000000 be changed ?

  • November 29, 2018
  • 9 replies
  • 2401 views

Hi, there

I am studying the sample codes : STM32F429I_Discovery_FMC_SDRAM and was wondering if the starting address of the SDRAM 0xD0000000 can be changed to something else. I don't see SDRAM memory section in the linker file and don't find any SDRAM registers that can be used to save the address of 0xD0000000.

Eric

    This topic has been closed for replies.

    9 replies

    Tesla DeLorean
    Guru
    November 29, 2018

    There are two possible decode banks 0xC0000000 and 0xD0000000 for the SDRAM off the FMC. The STM32F429I-DISCO is wired as the second bank. The FMC may have some additional bank swapping options, been a while since I looked.

    Why would it need to be at a different address?

    The linker script probably doesn't describe it because it doesn't come up initialized, the pins, controller and bus must be set up first, preferable in the SystemInit() function, or the call tree there. I would tend to commit it to the heap, and malloc() it from there.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Eric Lin
    Eric LinAuthor
    Associate II
    November 29, 2018

    Thank you for your response.

    I am just curious why it is 0xD0000000. Now, to commit it to the heap, how would I actually do that ? I took a look at the startup-***.s file and didn't find any related setup on the heap.

    Google didn't help me much.

    Thank you.

    Eric

    Tesla DeLorean
    Guru
    November 29, 2018

    The Reference Manual should provide details of the decode map within the ARM's 4GB address space, there are four regions within 0x60000000 for the NAND, NOR, SRAM type devices, and the SDRAM has 0xC0000000, 0xD0000000. Why the voids? Well the address decode is easier this way and requires less logic and complication.

    In the Keil/MDKARM startup.s the size of the HEAP is described, the scatter file could then be modified proving for an SDRAM region in the 0xD0000000 address of the 8MB provided by the memory, and the HEAP section directed there in. Similar things could be done with GNU/GCC linker scripts, or IAR .ICF files.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Eric Lin
    Eric LinAuthor
    Associate II
    November 30, 2018

    I found this thread, which gives the details of placing heap in the external SDRAM. It has everything you said in it. Thank you for your time on this. I learned and enjoyed it.

    http://www.openstm32.org/forumthread2017