How to change my S5PV210 BSP code to utilize 512MB DDR2 memory? RRS feed

  • Question

  • I have physically 512MB DRAM on my platform.But my BSP only suport 256MB memory.How to change my S5PV210 BSP code to utilize 512MB DDR2 memory? Below is my BSP code:

    //  File:  image_cfg.h
    //  Defines configuration parameters used to create the NK and Bootloader
    //  program images.
    #ifndef __IMAGE_CFG_H
    #define __IMAGE_CFG_H

    #if __cplusplus
    extern "C" {

    //  This file is a configuration file. It should ONLY contain simple #define
    //  directives defining constants. This file is included by other files that
    //  only support simple substitutions.

    //  The IMAGE_ naming convention ...
    //      <NAME>          - WINCE, BOOT, SHARE
    //      <SECTION>       - section name: user defined
    //      <MEMORY_DEVICE> - the memory device the block resides on
    //      OFFSET          - number of bytes from memory device start address
    //      SIZE            - maximum size of the block
    //      START           - start address of block    (device address + offset)
    //      END             - end address of block      (start address  + size - 1)

    // DRAM1 Base Address
    #ifdef   BSP_V210_DDR2_512
    #define DRAM_BASE_PA_START     (0x40000000)//(0x40000000)
    #define DRAM_BASE_CA_START     (0x80000000)//(0x80000000)
    #define DRAM_BASE_UA_START     (0xA0000000)//(0xA0000000)

    #define DRAM_BASE_PA_LAST     (0x50000000)//(0x48000000)
    #define DRAM_BASE_CA_LAST     (0x90000000)//(0x88000000)
    #define DRAM_BASE_UA_LAST     (0xB0000000)//(0xA8000000)

    // Extra DRAM1 Base Address for V210
    #define DRAM_EXTRA_BASE_PA_START   (0x50000000)//(0x48000000)
    #define DRAM_EXTRA_BASE_CA_START   (0x90000000)//(0x99600000)
    #define DRAM_EXTRA_BASE_UA_START   (0xB0000000)//(0xB9600000)
    #define DRAM_EXTRA_SIZE                       (0x0C000000)//(0x06A00000)

    #define DRAM_BASE_PA_START     (0x40000000)
    #define DRAM_BASE_CA_START     (0x80000000)
    #define DRAM_BASE_UA_START     (0xA0000000)

    #define DRAM_BASE_PA_LAST     (0x48000000)
    #define DRAM_BASE_CA_LAST     (0x88000000)
    #define DRAM_BASE_UA_LAST     (0xA8000000)

    // Extra DRAM1 Base Address for V210
    #define DRAM_EXTRA_BASE_PA_START   (0x48000000)
    #define DRAM_EXTRA_BASE_CA_START   (0x99600000)
    #define DRAM_EXTRA_BASE_UA_START   (0xB9600000)
    #define DRAM_EXTRA_SIZE                       (0x06A00000)



    #define    NKNAME      NK
    #define    NKSTART     80020000 ;80020000   change by ZMF
    #define    NKLEN       03FE0000    ; Max size (it will be autosized)
    #define    RAMNAME     RAM
    #define    RAMSTART    84000000 ;84000000
    #define    RAMLEN      04000000;01F00000 change by ZMF 20111010
    ;   NAME        ADDRESS     SIZE            TYPE
        $(NKNAME)   $(NKSTART)  $(NKLEN)        RAMIMAGE
        $(RAMNAME)  $(RAMSTART) $(RAMLEN)       RAM



    ;#ifdef BSP_V210_DDR2_512
    DRAM_BASE_CA_START        EQU    (0x80000000) ;(0x80000000)
    DRAM_BASE_UA_START        EQU    (0xA0000000) ;(0xA0000000) BSP_V210_DDR2_512
    DRAM_SIZE                 EQU    (0x10000000)
    ; Extra DRAM for V210
    DRAM_EXTRA_BASE_PA_START  EQU    (0x50000000);(0x48000000)
    DRAM_EXTRA_BASE_CA_START  EQU    (0x90000000);(0x99600000)
    DRAM_EXTRA_BASE_UA_START  EQU    (0xB0000000);(0xB9600000)
    DRAM_EXTRA_SIZE           EQU    (0x0C000000);(0x06A00000)

    ;DRAM_BASE_CA_START        EQU    (0x80000000)
    ;DRAM_BASE_UA_START        EQU    (0xA0000000)
    ;DRAM_SIZE                 EQU    (0x08000000)
    ; Extra DRAM for V210
    ;DRAM_EXTRA_BASE_PA_START  EQU    (0x48000000)
    ;DRAM_EXTRA_BASE_CA_START  EQU    (0x99600000)
    ;DRAM_EXTRA_BASE_UA_START  EQU    (0xB9600000) ;(0xB9500000)
    ;DRAM_EXTRA_SIZE           EQU    (0x06A00000) ;(0x06B00000)

            ; Define only used IP Block in OAL
            ; and comment which sw module this IP block will be used in

            DCD DRAM_BASE_CA_START,             DRAM_BASE_PA_START,      256 ; 128 MB DRAM   BSP_V210_DDR2_512 20111008
    ;        #ifdef BSP_V210_DDR2_512
            DCD DRAM0_BASE_CA_START,            DRAM0_BASE_PA_START,        256 ; 128 MB DRAM on DMC0        ZMF FOR 512 DDR2 BSP_V210_DDR2_512
    ;        #else
    ;        DCD DRAM0_BASE_CA_START,            DRAM0_BASE_PA_START,        128 ; 128 MB DRAM on DMC0       
    ;        #endif
            DCD BASE_REG_CA_CHIPID,             BASE_REG_PA_CHIPID,      43  ; 43 MB SFR
            ; PA: 0xE000_0000 (CHIP_ID)  -  VA: 0x9000_0000
         ;     ~
         ; PA: 0xE2A0_0000 (I2S2)     -  VA: 0x92A0_0000

    Tuesday, October 11, 2011 9:48 AM

All replies

  • See this forum, This may answer your question


    Tuesday, October 11, 2011 10:06 AM
  • If you're using a version of Windows CE different from Windows Embedded Compact 7 you can't use all the RAM: the OS can map 512 MB of memory but some ranges (in ARM CPU's like the one you're using) will be used to map the embedded peripherals (UART, memory controller, etc).

    In Windows Embedded Compact 7 you can take advantage of the new architecture, see:

    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom Check my blog:
    Tuesday, October 11, 2011 10:22 AM
  • Hi Mr.Vinoth

    Thanks for your reply.

    Wince only suport 512MB ram, it is not problem, but my system only have 256MB RAM, and my system have 512MB physical RAM. I don't to know how to modify my BSP.
    • Edited by zhengmeifu Friday, October 14, 2011 4:06 AM
    Friday, October 14, 2011 3:50 AM
  • Hi Luca Calligaris:

    Thanks for your reply.

    Friday, October 14, 2011 3:51 AM
  • Hi,

    Have you tried the define "BSP_V210_DDR2_512"?  

    Best regrads,


    Friday, October 14, 2011 6:50 AM
  • Thanks for reply. The "BSP_V210_DDR2_512" is defined by me. I have changed below code,but still not to work.

    Friday, October 14, 2011 9:19 AM
  • Windows CE only allows continuous physical memory for RAM to be configured as RAM in config.bib. Is your RAM continuous?

    If not, you have to use the function OEMGetExtensionDRAM() to map two separate physical memory sections.

    Friday, October 14, 2011 9:31 AM
  • Hi All , I also have the same issue , can anyone can help more detail , thanks !


    Best Regards,

    Calvin Liu


    Monday, October 24, 2011 1:35 AM
  • Hi Calvin Liu :are you chinese?How to contact with you? This is my QQ :26451602. Did you had this issue resolved? Any other specialist could help me? Thanks

    Thursday, November 3, 2011 2:25 AM
  • Hi zhengmeifu , Sorry I don't have a way to solve this problem now , from change setting "config.bib" , I just can increase the memory size (show in WinCE UI) to about 270M , if increase more , the NK.bin failed to start .


    ;#define    RAMLEN      01F00000   ;  default , for 240448 KB show in wince system 

    #define    RAMLEN       04F00000   ;  after setting , 240448 KB + (16*3)MB  can be show in wince UI 


    I also try to modify the file your mention , but get the same result as you .

    yes I am in GuangZhou city or ShenZhen city  and not favorite chat at IM tools , anyway ,you can mail me anytime ,

    Thanks !  

    Best Regards,

    Calvin Liu



    Friday, November 4, 2011 1:08 AM