This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

STM32 SDRAM Scatter File

Hello,

i have the following problem:

I would like to access the external SDRAM on the STM32F429 Discovery. I could access the external SDRAM, that is not the main problem. The problem is, that i have to access the external SDRAM as the following:

 /* SDRAM Initialization */
  SDRAM_Init();

  /* FMC SDRAM GPIOs Configuration */
  SDRAM_GPIOConfig();

//Write SDRAM
  for (counter = 0; counter < TRANSFERS; counter++)
  {
    *(__IO uint16_t*) (SDRAM_BANK_ADDR + 2*counter) = (uint16_t)(uhWritedata_16b + counter);
  }

Here i havé to add the Address "SDRAM_BANK_ADDR" if i would like to write into the external SDRAM. Now i should configure the Scatter - File that i doesn't need that Section. How must be the changes? Is it possible to auto - configure this Section as external SDRAM?

My Scatter File looks like this:


; *************************************************************
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************

LR_IROM1 0x08000000 0x00200000  {    ; load region size_region
  ER_IROM1 0x08000000 0x00200000  {  ; load address = execution address
   *.o (RESET, +First)
   *(InRoot$$Sections)
   .ANY (+RO)
  }
  RW_IRAM1 0x20000000 0x00030000  {  ; RW data
   .ANY (+RW +ZI)
  }
}


;LR_ERAM1 0xD0000000 0xD0400000 {
        ;ER_ERAM1 0xD0000000 0xD0400000  {
          ;.ANY (+RW +ZI)
        ;}
;}



Thanks for your help.

Parents
  • It's specified in the Scatter File as a SIZE, not by an end address.
    So 0xD0000000 0x400000

    If you use it in the linker, then you'd had better initialize the external memory interface and SDRAM in the SystemInit() routine so the C run time code can copy statics into the SDRAM

    You can access the SDRAM with pointers, make absolute declarations, or put the heap there.

    unsigned char *FrameBuffer = (unsigned char *)0xD0100000;

Reply
  • It's specified in the Scatter File as a SIZE, not by an end address.
    So 0xD0000000 0x400000

    If you use it in the linker, then you'd had better initialize the external memory interface and SDRAM in the SystemInit() routine so the C run time code can copy statics into the SDRAM

    You can access the SDRAM with pointers, make absolute declarations, or put the heap there.

    unsigned char *FrameBuffer = (unsigned char *)0xD0100000;

Children