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.

Problem with u-boot.min.uart on custom board DM8148 with 2GB DDR3

Hello TI' teams.
I work with custom board developed at company. On board: DM8148 PG3.0 and 2GB of DDR3, 1GB per each EMIF.
We use DDR from Micron – 2 chips MT41K256M16HA-125 per each EMIF (totally 4 DDR' chips on board).
Here DDR' spec: http://www.micron.com/parts/dram/ddr3-sdram/mt41k256m16ha-125
DDR3 tests via JTAG and CCS works fine.
Currently I have a troubles with board bring up.
I tried to load 1-st stage u-boot (in TI' terminology minimal u-boot) via UART to board. "u-boot.min.uart" loaded successfully, but after load completion I don't see prompt.
When connect to the board from Code Composer via JTAG I saw that u-boot hangs in dead loop. Program Counter on address 0x2008Ch. TRM define this dead loop as "Data abort exception default handler" (please see sprugz8d, page 1002 – 4.3.13 "Dead Loops"). From this forum I understand that this dead loop typically occurred when ARM try to access to non-existed memory.

For u-boot I use DM8148 EVM u-boot with my minor modifications corresponds to our DDR timing and LISA configuration.
 
DMM_LISA configured are as following:
__raw_writel(0x00000000, DMM_LISA_MAP__0);
__raw_writel(0x00000000, DMM_LISA_MAP__1);
__raw_writel(0x80600100, DMM_LISA_MAP__2); // 1GB mapped on SDRC0 only, not interleaved
__raw_writel(0xC0600240, DMM_LISA_MAP__3); // 1GB mapped on SDRC1 only, not interleaved


DRAM configuration defined as is following:

#define PHYS_DRAM_1                   0x80000000
#define PHYS_DRAM_2                   0xC0000000
#define PHYS_DRAM_1_SIZE              0x40000000
#define PHYS_DRAM_2_SIZE              0x40000000


ARM core registers snapshot by CCS:
=======================================
Core Registers
 PC 0x0002008C Program Counter [Core]
 SP 0x00000000 General Purpose Register 13 [Core]
 LR 0x80705944 General Purpose Register 14 [Core]
 CPSR 0x60000197 Stores the status of interrupt enables and critical processor status signals [Core]
 R0 0x8070E593 General Purpose Register 0 [Core]
 R1 0x00000801 General Purpose Register 1 [Core]
 R2 0x00000000 General Purpose Register 2 [Core]
 R3 0x8070442C General Purpose Register 3 [Core]
 R4 0x8070E58F General Purpose Register 4 [Core]
 R5 0x8070E5BC General Purpose Register 5 [Core]
 R6 0x00000001 General Purpose Register 6 [Core]
 R7 0x00000001 General Purpose Register 7 [Core]
 R8 0x80704614 General Purpose Register 8 [Core]
 R9 0x8070E5AE General Purpose Register 9 [Core]
 R10 0x1A1A1A1A General Purpose Register 10 [Core]
 R11 0x00027C94 General Purpose Register 11 [Core]
 R12 0x507F853F General Purpose Register 12 [Core]
 R13 0x00000000 General Purpose Register 13 [Core]
 R14 0x80705944 General Purpose Register 14 [Core]
USER_Registers
 R8_USER 0x80704614 General Purpose Register 8 in USER mode [Core]
 R9_USER 0x8070E5AE General Purpose Register 9 in USER mode [Core]
 R10_USER 0x1A1A1A1A General Purpose Register 10 in USER mode [Core]
 R11_USER 0x00027C94 General Purpose Register 11 in USER mode [Core]
 R12_USER 0x507F853F General Purpose Register 12 in USER mode [Core]
 R13_USER 0x00000000 General Purpose Register 13 in USER mode [Core]
 R14_USER 0x00000000 General Purpose Register 14 in USER mode [Core]
FIQ_Registers
 SPSR_FIQ 0x00000000 Stores the status of interrupt enables and critical processor status signals [Core]
 R8_FIQ 0x014633DC General Purpose Register 8 in FIQ mode [Core]
 R9_FIQ 0x8810790F General Purpose Register 9 in FIQ mode [Core]
 R10_FIQ 0x10E6343D General Purpose Register 10 in FIQ mode [Core]
 R11_FIQ 0x4A6035A4 General Purpose Register 11 in FIQ mode [Core]
 R12_FIQ 0x080D00D8 General Purpose Register 12 in FIQ mode [Core]
 R13_FIQ 0x00000000 General Purpose Register 13 in FIQ mode [Core]
 R14_FIQ 0x00000000 General Purpose Register 14 in FIQ mode [Core]
Supervisor_Registers
 SPSR_SVC 0x00000000 Stores the status of interrupt enables and critical processor status signals in supervisor mode [Core]
 R13_SVC 0x806FDB70 General Purpose Register 13 in Supervisor mode [Core]
 R14_SVC 0x8070051C General Purpose Register 14 in Supervisor mode [Core]

I would be very grateful if you could help me fix the problem. (possible correct my wrong LISA setting?).
ThanX alot.

 

  • for additional: my dvr-rdk version - 4.1

    How I can locate the jump to dead loop? Is exist any way to debug u-boot with CCS with symbolic info?
    My CCS runs on Windows platform, but DVR-RDK under Ubuntu.

  • Marat,

    Marat Shchuchinsky said:
    DMM_LISA configured are as following:
    __raw_writel(0x00000000, DMM_LISA_MAP__0);
    __raw_writel(0x00000000, DMM_LISA_MAP__1);
    __raw_writel(0x80600100, DMM_LISA_MAP__2); // 1GB mapped on SDRC0 only, not interleaved
    __raw_writel(0xC0600240, DMM_LISA_MAP__3); // 1GB mapped on SDRC1 only, not interleaved

    Can you try with DMM_LISA_MAP_x[22:20] SYS_SIZE = 0x7 (not 0x6).

    In the DM814x device TRM is stated that 0x6 is for 1GB, 0x7 is for 2GB. See Table 6-14. DMM_LISA_MAP Registers Field Descriptions

    Also in section 6.3.4.1.1 Case 1: Two Memory Controllers, 2GB DDR Symmetrical Distribution, we have:

    Use Case: In this example we assume 2GB of external memory, spread evenly between 2 SDRAM
    controllers.

    SYS_SIZE  7h (2 GB)

    I have also check the OMAP5432 TI EVM, which has 2GB RAM on it, and the DMM_LISA_MAP_3 = 0x80740300 (other DMM_LISA_MAP registers are 0).

    See also the below links:

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/t/286342.aspx

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/t/222065.aspx

    Marat Shchuchinsky said:

    DRAM configuration defined as is following:

    #define PHYS_DRAM_1                   0x80000000
    #define PHYS_DRAM_2                   0xC0000000
    #define PHYS_DRAM_1_SIZE              0x40000000
    #define PHYS_DRAM_2_SIZE              0x40000000

    I think these are correct for 2GB.

    Best regards,
    Pavel

  • Hello Pavel,
    Thaks alot for your reply.
    Unfortunatelly With LISA setting proposed by you I have same error. :-(

    This is core registers contains with LISA:
    __raw_writel(0x00000000, DMM_LISA_MAP__0);
    __raw_writel(0x00000000, DMM_LISA_MAP__1);
    __raw_writel(0x80700100, DMM_LISA_MAP__2);
    __raw_writel(0xC0700240, DMM_LISA_MAP__3);

    Core Registers 
     PC 0x0002008C 
     SP 0x00000000 
     LR 0x80705944 
     CPSR 0x60000197 
     R0 0x8070E593 
     R1 0x00000801 
     R2 0x00000000 
     R3 0x8070442C 
     R4 0x8070E58F 
     R5 0x8070E5BC 
     R6 0x00000001
     R7 0x00000001 
     R8 0x80704614 
     R9 0x8070E5AE 
     R10 0x1A1A1A1A 
     R11 0x00027C94 
     R12 0x507F853F 
     R13 0x00000000
     R14 0x80705944


    And this is core regsiters contains with
    __raw_writel(0x00000000, DMM_LISA_MAP__0);
    __raw_writel(0x00000000, DMM_LISA_MAP__1);
    __raw_writel(0x00000000, DMM_LISA_MAP__2);
    __raw_writel(0x80740300, DMM_LISA_MAP__3);

    Core Registers 
     PC 0x0002008C
     SP 0x00000000 
     LR 0x8070051C
     CPSR 0x60000197 
     R0 0x00000F09 
     R1 0x00000801 
     R2 0x00000000 
     R3 0x00000001 
     R4 0x00000001 
     R5 0x80704614 
     R6 0x8070E5A2 
     R7 0x1A1A1A1A
     R8 0x1A1A1A1A
     R9 0x1A1A1A1A
     R10 0x1A1A1A1A 
     R11 0x00027C94 
     R12 0x507F853F
     R13 0x00000000
     R14 0x8070051C

    Please let me know, exist any way debug u-boot with symbolic info? My CCS runs under Windows, but dvr-rdk development under Ubuntu.

  • Found that u-boot.min crashed on relocation from OCMC-RAM to DDR.
    I saw from CCS that crash occured after this instruction (see attached screenshot - one step before 0x2008Ch dead loop):

    403000d0: LDR PC, 0x403000D4

  • Marat,

    Marat Shchuchinsky said:
    Unfortunatelly With LISA setting proposed by you I have same error.

    Can you try with the default 1GB RAM u-boot, do you have the same? If yes, then the problem is not into the DMM_LISA_MAP_x registers setting.

    I suspect that the problem is in the HW design. You should check:

    DM814x datasheet, 8.13 DDR2/DDR3 Memory Controller

    http://processors.wiki.ti.com/index.php/DM814x_Hardware_Design_Guide

    http://processors.wiki.ti.com/index.php/AM387x_/_C6A814x_Schematic_Review_Checklist

    http://processors.wiki.ti.com/index.php/TI814x-DDR3-Init-U-Boot

    http://processors.wiki.ti.com/index.php/DDR_Routing_Checklist

    http://processors.wiki.ti.com/index.php/Common_DDR_Issues

    The Mistral DM8148 EVM reference schematics:

    http://www.mistralsolutions.com/pes-support/support-downloads/tmdxevm8148.html#

    The Mistral EVM DDR3 diagnostic software tests (BB_021_DDR3_TEST.out)

    Marat Shchuchinsky said:
    Please let me know, exist any way debug u-boot with symbolic info?

    Please have a look in the below e2e thread:

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/t/331762.aspx

    Best regards,
    Pavel

  • Hello Pavel.
    I tried with default LISA setting taken from EVM:

    DMM_LISA_MAP__0: 0x80600100
    DMM_LISA_MAP__1: 0x80600100
    DMM_LISA_MAP__2: 0xC0600200
    DMM_LISA_MAP__3: 0xC0600200

    only modify timing corresponds to my DDR type and unfortunatelly have same result

  • Hi Pavel,

    finally this problem fixed. Was "stupid" omission - wrong DDR setting in DRAM RAW PAGE SIZE.

    ThanX alot for your help.

  • Hi Marat,

    Here, I encountered the same problem, can you tell me where I can modify the DRAM RAW PAGE SIZE.

  • Hi

    see SDRCR register, bits 0...2