This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM4372: System with 2x512MB RAM chips, but the system report only 512MB

Part Number: AM4372

Hi TI, 

I have a design based on an AM4372x with 2 RAM memories of 512MB each. The output of the system there are 512 MB, please see the picture.

I don't know if the system should say 1GB, or is it normal that it shows 512MB.

Is this normal or the system recognizes only one RAM and in that case I have a configuration problem?

Attention: Both memories share the same address bus (A0-A14) and each memory has 16bits on the data bus (D0-15 -> RAM1, D16-31 -> RAM2). This is why I think that maybe this system output is normal.

Thank you very much. Best Regards. 

  • Hi Alberto,
    DDR size is "dynamically" determined in SPL/u-boot via calling get_ram_size() as listed below:

    where dram_init() in "/arch/arm/mach-omap2/am33xx/board.c", and get_ram_size() in "/common/memsize.c"
    /*
     * Check memory range for valid RAM. A simple memory test determines
     * the actually available RAM size between addresses `base' and
     * `base + maxsize'.
     */
    long get_ram_size(long *base, long maxsize){}
    
    int dram_init(void)
    {
    #ifndef CONFIG_SKIP_LOWLEVEL_INIT
    	sdram_init();
    #endif
    
    	/* dram_init must store complete ramsize in gd->ram_size */
    	gd->ram_size = get_ram_size(
    			(void *)CONFIG_SYS_SDRAM_BASE,
    			CONFIG_MAX_RAM_BANK_SIZE);
    	return 0;
    }
    where for AM437x EVM (2GB DDR)
    - /include/configs/am43xx_evm.h
    #define CONFIG_MAX_RAM_BANK_SIZE	(1024 << 21)	/* 2GB */
    - /include/configs/ti_armv7_common.h
    #define CONFIG_SYS_SDRAM_BASE		0x80000000

    On DDR connection options, have you cross-referenced section 5.12.8.2 Memory Interface in AM43xx datasheet (www.ti.com/.../am4379)

    Best,
    -Hong

  • Hi Hong Guan64, 

    Thank you very much, 

    My question is if in a hardware like the one I show in the attached image, is it normal for the system to detect 512MB, or should it detect 1GB?

    Thank yuo very much. 

  • Hi Alberto,
    Following up my last reply, let me use Linux SDK 6.3 as an example:
    By default, for AM437x EVM (2GB DDR)

    - /include/configs/am43xx_evm.h
    #define CONFIG_MAX_RAM_BANK_SIZE	(1024 << 21)	/* 2GB */
    
    The u-boot log would be:
    U-Boot 2019.01-g175b3522cc-dirty (Apr 26 2021 - 15:31:10 -0500)
    ...
    DRAM:  2 GiB
    ...

    If I make one change as listed below in u-boot code:

    - /include/configs/am43xx_evm.h
    #define CONFIG_MAX_RAM_BANK_SIZE	(1024 << 20)	/* 1GB */

    I'm attaching the new log file with the above u-boot change, where
    ...
    DRAM: 1 GiB
    ...

    Can we check "CONFIG_MAX_RAM_BANK_SIZE" configuration in your u-boot?
    - /include/configs/am43xx_evm.h
    #define CONFIG_MAX_RAM_BANK_SIZE ???

    Best,
    -Hong

    U-Boot SPL 2019.01-g175b3522cc-dirty (Apr 26 2021 - 15:31:10 -0500)
    Trying to boot from MMC1
    ...
    U-Boot 2019.01-g175b3522cc-dirty (Apr 26 2021 - 15:31:10 -0500)
    ...
    DRAM:  1 GiB
    ...
    Hit any key to stop autoboot:  2  1  0 
    => bdinfo
    arch_number = 0x00000000
    boot_params = 0x80000100
    DRAM bank   = 0x00000000
    -> start    = 0x80000000
    -> size     = 0x40000000
    baudrate    = 115200 bps
    TLB addr    = 0xbfff0000
    relocaddr   = 0xbff4c000
    reloc off   = 0x3f74c000
    irq_sp      = 0xbdf2ca60
    sp start    = 0xbdf2ca50
    Early malloc usage: b50 / 2000
    fdt_blob    = 0xbdf2ca78
    => 

  • Ok, I understand. Thank you very much!