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.

SDRAM Problem

Other Parts Discussed in Thread: AM5728, DRA752

Hii,

      We have developed our customized board with AM5777 processor and while booting from memory card on the console i am getting the below error message and stops. What can be the reason, is it problem with SDRAM power supply or what?

DRA5...

SDRAM: identified size not same as expected size identified: 0 expected: 40000000

Hangs here.

Thanks & Regards

Ganesh

  • Hello Ganesh,

    I assume that your problem may cause by incorrect DDR timings.

    I suggest you trying mainline U-boot (2014.07) from Denx - git.denx.de;a=summary

    What type is your SDRAM/memory device?

    Best regards,
    Yanko
  • Hii Yanko,


    We have used the same DDR memory, used in the VAYU EVM. The same code is working for the VAYU EVM, but not with our board.


    Thanks & Regards,
    Ganesh
  • Hi,
    I would like you to suggest to debug your board through JTAG and make sure that your SDRAM's sw DDR timing configuration and hw connection is good.
    Use gel file for debugging by using CCS and try to run some examples on SDRAM.

    What other hw changes you have on your custom board apart from EVM ?
    Did you change the u-boot code or running pre-built of EVM ?
  • Hi,

    The hw changes from EVM are we have used MMC3 for eMMC instead of MMC2, and addition of some serial ports only. At present we have not changed the u-boot code as we are not using those peripherals. We are using same u-boot code of EVM. Actually i have no idea on how to debug our board through JTAG. I have used CCS IDE for controller, but not have any idea how to use JTAG with processor.

    Thanks & Regards,
    Ganesh
  • Hello Ganesh,

    Please contact your FAE to obtain DRA7xx chip support packet (gel files) for CCS. The best approach for debugging your board is by using JTAG.

    I would point you an important note from TRM:

    NOTE: eMMC functionality is supported fully by MMC2 only. The other MMC modules are capable of eMMC functionality, but are not timing-optimized for eMMC. For more information about timing limitations, see the data manual of the device.

    Try to boot from SD card.

    Best regards,
    Yanko
  • Hii Yanko,


    Can you please share GEL files for AM5728 processor and also user guide for using .gel files

    Thanks & Regards,
    Ganesh
  • Ganesh,

    GEL files for AM5728 is not public accessible packet. It requires NDA agreement with TI. Therefore I cannot share such packet in our public e2e forum.
    I already suggest you to contact your FAE for providing you with appropriate support. FAE must have access to chip support packets.

    Best regards,
    Yanko
  • Hi Yanko,

    Previously i have some problems in the DDR supply section, now the supply is OK and frequently i am getting the identified size some value like 80,20 ... But how is it possible to detect 20 or 80. Is it timing issue or something else?

    SDRAM: identified size not same as expected size identified: 80 expected: 40000000

    Thanks & Regards
    Ganesh.
  • Hi Yanko,

    I have received GEL files from TI. I was able to connect JTAG and read all the register values. But how to ensure SDRAM timings now and how to run some examples on SDRAM?


    Thanks & Regards,
    Ganesh
  • Hi,
    Create new sample hello world and change the linker command files *.cmd to run the code on DDR, then build and run.

    processors.wiki.ti.com/.../Linker_Command_File_Primer
    processors.wiki.ti.com/.../Files_in_CCS_Projects
  • Hello Ganesh, 

    In addition to Titu's comment.

    You can apply SDRAM timing values in the u-boot, and try to run this new configuration on your board.

     Take a look on the file u-boot/arch/arm/cpu/armv7/omap5/sdram.c: and apply your SDRAM configuration:

    * For any new board with different memory devices over-ride one or more
    * of the following functions as per the CONFIG flags you intend to enable:
    * - emif_get_reg_dump()
    * - emif_get_dmm_regs()
    * - emif_get_device_details()
    * - emif_get_device_timings()
    */

    .....

    /*
    * DRA752 EVM board has 1.5 GB of memory
    * EMIF1 --> 2Gb * 2 = 512MB
    * EMIF2 --> 2Gb * 4 = 1GB
    * so mapping 1GB interleaved and 512MB non-interleaved
    */

    You must also check your board configuration in another two files:

    u-boot/arch/arm/cpu/armv7/omap5/hw_data.c

    static const struct dpll_params

    const struct ctrl_ioregs ioregs_dra7xx_es1

    void __weak hw_data_init(void)

    struct dplls dra7xx_dplls = {
    .mpu = mpu_dpll_params_1ghz,
    .core = core_dpll_params_2128mhz_dra7xx,
    .per = per_dpll_params_768mhz_dra7xx,
    .abe = abe_dpll_params_sysclk2_361267khz,
    .iva = iva_dpll_params_2330mhz_dra7xx,
    .usb = usb_dpll_params_1920mhz,
    .ddr = ddr_dpll_params_2128mhz,
    .gmac = gmac_dpll_params_2000mhz,
    };

    struct dplls dra72x_dplls = {
    .mpu = mpu_dpll_params_1ghz,
    .core = core_dpll_params_2128mhz_dra7xx,
    .per = per_dpll_params_768mhz_dra7xx,
    .abe = abe_dpll_params_sysclk2_361267khz,
    .iva = iva_dpll_params_2330mhz_dra7xx,
    .usb = usb_dpll_params_1920mhz,
    .ddr = ddr_dpll_params_2664mhz,
    .gmac = gmac_dpll_params_2000mhz,
    };

    u-boot/arch/arm/cpu/armv7/omap5/hwinit.c

    /* DDR3 specific IO settings */
    static void io_settings_ddr3(void)

    Could you specify your DDR memory devices connected to DRA7xx?

    Best regards,

    Yanko

  • Hi Yanko,

    I am using MT41K128M16JT-125:k -- 2 ICs
    MT41K256M8 -- 4 ICs

    Thanks & Regards,
    Ganesh
  • Hello Ganesh,

    DDR devices in your device are the same as on VAYU EVM.
    I guess that MT41K128M16JT-125:k are connected to EMIF1 and MT41K256M8 are connected to EMIF2.

    However on your EMIF1 module you have two devices. Hence you must set your settings in u-boot/arch/arm/cpu/armv7/omap5/sdram.c:
    /*
    * DRA752 EVM EMIF1 ONLY CONFIGURATION
    */
    const struct dmm_lisa_map_regs lisa_map_2G_x_1_x_2 = {
    .dmm_lisa_map_0 = 0x0,
    .dmm_lisa_map_1 = 0x0,
    .dmm_lisa_map_2 = 0x80500100,
    .dmm_lisa_map_3 = 0xFF020100,
    .is_ma_present = 0x1
    };

    /*
    * DRA752 EVM EMIF2 ONLY CONFIGURATION
    */
    const struct dmm_lisa_map_regs lisa_map_2G_x_2_x_2 = {
    .dmm_lisa_map_0 = 0x0,
    .dmm_lisa_map_1 = 0x0,
    .dmm_lisa_map_2 = 0x80600200,
    .dmm_lisa_map_3 = 0xFF020100,
    .is_ma_present = 0x1

    Did you debug your board with gel files and JTAG?

    Best regards,
    Yanko
  • Hi Yanko,

    I have verified lisa_map_2G_x_1_x_2,  lisa_map_2G_x_2_x_2 in u-boot code, those values are same as you specified. Actually we are using DDR same as DRA752 EVM only. Only change is there data bus is randomly connected to data lines, we have connected data bus in an order, but that should not cause any problems.


    I was able to connect JTAG and debug, but i guess the values that i am getting in the registers is what we have written in gel files. By doing like that how can you ensure the DDR timings?

    Thanks & Regards,
    Ganesh

  • Hello Ganesh,

    I was able to connect JTAG and debug, but i guess the values that i am getting in the registers is what we have written in gel files.

    - Yes, you can test your DDR by this way. In addition you can use values from gel files as apply them in u-boot.  

    By doing like that how can you ensure the DDR timings?


    For calculating DDR timings you must use VAYU EMIF4D5E DDR3 EMIF2 Programming.xls spreadsheet. You can obtain this document from your FAE.

    Best regards,

    Yanko

  • Hi Yanko,

    I was able to connect JTAG and debug, but i guess the values that i am getting in the registers is what we have written in gel files.

    - Yes, you can test your DDR by this way. In addition you can use values from gel files as apply them in u-boot.

    ------- Using gel files we are just reading all the values of registers in the processor only what we have written using gel files, by doing like that we are not testing DDR right?

    Thanks & Regards,
    Ganesh
  • Hi Yanko,

    SDRAM problem is solved, that is resolved when processor DDR reset signals is connected to DDR ICs. And after that the code hangs in u-boot after these messages

    OMAP SD/MMC: 0<CR><LF>
    reading u-boot.img<CR><LF>
    reading u-boot.img<CR><LF>
    <CR><LF>
    <CR><LF>
    U-Boot 2013.04 (Jun 25 2015 - 19:30:24)<CR><LF>
    <CR><LF>
    CPU : DRA752 ES1.1<CR><LF>
    Board: DRA7xx<CR><LF>
    I2C: ready<CR><LF>
    DRAM: 1.5 GiB<CR><LF>
    WARNING: Caches not enabled<CR><LF>
    MMOMAP SD/MMC: 0, OMAP SD/MMC: 1<CR><LF>
    Using default environment<CR><LF>
    <CR><LF>


    The same u-boot code is working fine with EVM. After debugging u-boot code i have found that after printing puts("Using default environment\n\n");

    it hangs in the function

    himport_r(&env_htab, (char *)default_environment, sizeof(default_environment), '\0', flags, 0, NULL).

    Within the himport_r (/*hashtable.c*/) function hangs after

    if (!drop_var_from_set(name, nvars, localvars))
    continue;


    What can be the possible reasons and soluions?


    Thanks & Regards,

    Ganesh
  • Hi Ganesh,
    Sounds good.
    We were glad that you able to solve your problem.

    Could you please create a new post for your new problem.