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.

DDR3 MT41J128M16 not working with DM8148?

Other Parts Discussed in Thread: CCSTUDIO

Hello All,

We have made a custom board based on DM8148, using DDR3 "MT41J128M16 JT-125" from micron.

What all we are expected to do in u-boot to get DDR access working by programming DDR3 controller in correct way?

We have connected 2 DDRs each with DDR0 and DDR1 controller.

We have the default uboot configuration for ti8148evm, which has "MT41J128M8JP-125".

br

Vikas

 

  • Hi Vikas,

    Let me confirm something. You have 2 DDR3 chips on the DDR0 controller and 2 DDR3 chips on the DDR1 controller, thus total DDR system size is 1GB, is that correct?

    Do you have any console message when running the u-boot? Could you provide full log.

    Best regards,
    Pavel

  • Hello Pavel,

    Yes you are right, that we have 2 DDR3 chips on the DDR0 controller and 2 DDR3 chips on the DDR1 controller, and total of 8Gb (1GB ram).

    We have made a custom board based on DM8148, in which the normal boot sequence is "eMMC, SPI, UART, ethernet".

    and eMMC is permanently mounted behind mmc.

    Now on a fresh board bring up, we were supposed to use UART or etherboot to flash the MMC, but unfortunatly both of these oprions are not working.

    We are able to transfer the "uboot.min.uart" image using uart(xmodem), but the control never shifts to uboot.min, i.e. we don't see the TI_MIN# prompt.

    Although i know this is related to OCMC not executing the uboot.min.uart file for reasons i don't know?

    This also prompts me to think, that DDR3 controller is not correctly initialized.

    Any idea, if i am looking in correction direction?

  • Vikas,

    DM814x device has three MMC controllers: MMC0, MMC1 and MMC2. Only MMC1 is able to boot from. Do you connect the eMMC to MMC1?

    BR

    Pavel

  • Vikas,

    Can you also provide me the u-boot.min.uart file, I want to test it on my own DM814x EVM. This is the full log, when I boot from UART:

    pbotev@pbotev:~/Desktop$ sudo picocom -b 115200 /dev/ttyUSB0 --send-cmd "sx -vv"
    picocom v1.4

    port is        : /dev/ttyUSB0
    flowcontrol    : none
    baudrate is    : 115200
    parity is      : none
    databits are   : 8
    escape is      : C-a
    noinit is      : no
    noreset is     : no
    nolock is      : no
    send_cmd is    : sx -vv
    receive_cmd is : rz -vv

    Terminal ready

    *** file: u-boot.min.uart
    sx -vv u-boot.min.uart
    Sending u-boot.min.uart, 397 blocks: Give your local XMODEM receive command now.
    Bytes Sent:  50944   BPS:5221                            

    Transfer complete

    *** exit status: 0


    U-Boot 2010.06 (Jun 17 2013 - 11:23:14)

    TI8148-GP rev 2.1

    ARM clk: 600MHz
    DDR clk: 400MHz

    DRAM:  1 GiB
    Using default environment

    The 2nd stage U-Boot will now be auto-loaded
    Please do not interrupt the countdown till TI8148_EVM prompt if 2nd stage is already flashed
    Hit any key to stop autoboot:  0
    TI-MIN#

    At which step before the TI-MIN# your flow stops?

    BR
    Pavel

  • Hello Pavel,

    Currently on a fresh board bring up, this eMMC is empty.

    So we expected in boot sequence, to jump to next option in booting,..and we can confirm, that ROM code are switching to next on booting sequence, and we see CCCCC on uart terminal.

    Yes you are right, we have connected our eMMC to MMC1.

    br

    Vikas

     

     

  • Vikas,

    Vikas Rustagi said:
    boot sequence is "eMMC, SPI, UART, ethernet".

    Next option is SPI and then is UART, right? Can you try to make UART boot first option, just for the test. Do you have the same problem? Please also provide me the u-boot.min.uart file.

    I do not think the DDR3 can be the issue here, as DDR3 memory is used at the next stage, in the second stage bootloader u-boot.bin, while we are still in the first stage bootloader u-boot.min.uart, where the OCMC RAM is used.

    BR
    Pavel

  • Pavel,

    Find attached the u-boot.min.uart.

    You are right, that first stage bootloader executes from OCMC ram,

    I tried to use some printf messages in the bootloader code, but i don't see them on terminal.

    So i am not sure, which part of code is mis-behaving.

    Can you tell us, how to debug if first stage bootloader is working as expecting?

    br

    Vikas

     

     

  • 0272.u-boot.min.uart.gz

    sorry, i forgot to attach the file earlier,

    br

    Vikas

  • Vikas,

    Your u-boot.min.uart file does not work on my DM814x EVM also, this is what happens:

    pbotev@pbotev:~/Desktop$ sudo picocom -b 115200 /dev/ttyUSB0 --send-cmd "sx -vv"
    picocom v1.4

    port is        : /dev/ttyUSB0
    flowcontrol    : none
    baudrate is    : 115200
    parity is      : none
    databits are   : 8
    escape is      : C-a
    noinit is      : no
    noreset is     : no
    nolock is      : no
    send_cmd is    : sx -vv
    receive_cmd is : rz -vv

    Terminal ready

    *** file: u-boot.min.uart
    sx -vv u-boot.min.uart
    Sending u-boot.min.uart, 398 blocks: Give your local XMODEM receive command now.
    Bytes Sent:  51072   BPS:4483                           

    Transfer complete

    *** exit status: 0

    The flow stuck at the "*** exit status: 0" line. Is it the same on your side? How exactly you are generating this u-boot.min.uart file, could you provide me the exact steps? Can you try with my own u-boot.min.uart file, it is attached: 6761.u-boot.min.uart.gz

    Have you made any modifications in the u-boot source code? If yes, what exactly?

    BR
    Pavel

  • Hello Pavel,

    We also tried with your image, but with no improvement.

    Yes we have made changes in uboot source mainly pertaining to MUX settings, cpu clock switched to 1GHZ, and some settings for SPI.

    If you are still interested, we can provide the patches, we do have.

    br

    Vikas

  • Vikas,

    Vikas Rustagi said:
    We also tried with your image, but with no improvement.

    Are you on EZSDK 5.05.02.00? Can you remove all your patches and generate new uboot.min.uart and try with it.

    Vikas Rustagi said:
    If you are still interested, we can provide the patches, we do have.

    Yes, provide me the patches. I want to try this on my DM8148 EVM one by one.

    BR
    Pavel

  • Vikas,

    Let us also double check the steps for UART boot.

    1. Refer to the http://processors.wiki.ti.com/index.php/TI81XX_PSP_U-Boot#Building_U-Boot for how to generate u-boot.min.uart

    $ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm distclean
    $ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm ti8148_evm_min_uart
    $ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm u-boot.ti

    2. Make sure you configure the BTMODE[4:0] pins for UART boot

    3. Start the picocom with the following command:
    $ picocom -b 115200 /dev/ttyUSB0 --send-cmd "sx -vv"

    Make sure u-boot.min.uart is located in the same place where you start the picocom.

    4. Press Ctrl + A + S and type u-boot.min.uart

    5. Press Enter and power on the board


  • Pavel,

    Finally We could see the prompt message after we changed the DDR3 clock to 200MHz.

    i.e., i simply changed one line in u-boot "arch/arm/include/asm/arch-ti81xx/clocks_ti814x.h"

    #define DDR_M         (pg_val_ti814x(666,400))

    instead of

    #define DDR_M         (pg_val_ti814x(666,800))

    But still i am not convinced, what it has got to do with not seeing the prompt message, as it was running in OCMC RAM.

    But finally our object is to run the DDR3 @400MHz, and this has got to do with providing correct CK,DQS trace length for our custom board, and the emulator would provide the correct DDR settings to be programmed in 'dr_defs_814x.h'.

    But currently emulator is not able to recognise our custom board. So we are trying to debug what could be the issue. But we have verified, atleast the jtag interface is working.

    in case you can provide us some hints in order to connect the emulator on our custom board based on ti8148.

    Anyways thanks for your help.

  • Vikas,

    Vikas Rustagi said:
    But finally our object is to run the DDR3 @400MHz, and this has got to do with providing correct CK,DQS trace length for our custom board, and the emulator would provide the correct DDR settings to be programmed in 'dr_defs_814x.h'.

    Yes, this is correct. See also the below thread:

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/p/159184/903847.aspx#903847

    Vikas Rustagi said:
    But currently emulator is not able to recognise our custom board.

    I assume you are using emulator with CCSv5. What type of emulator you are using? I am using Blackhawk USB560-M and CCSv5 on DM814x EVM. Do you have any warning/error message while you are trying to connect the emulator to the DM814x board?

    Please note that we have special forum for CCStudio: http://e2e.ti.com/support/development_tools/code_composer_studio/default.aspx. You can also ask there.

    Best regards,
    Pavel

  • Hi,

      I use the same chips with you,and I test ddr in ccs5,it always wrong in 400Mhz.Have you solve this problem?

     

     

     

     

     

    B&R

    enson