DDR Initialization Failed

cancel
Showing results for 
Search instead for 
Did you mean: 

DDR Initialization Failed

Jump to solution
212 Views
rashmikj
Contributor II

Hello,

We've made our custom board with 8GB of DDR4 based on FRWYLS1046A KIt and can't bring-up the memory controller. We are using QCVS  tool for debugging the DDR. It gives DDR initialization failed. D_INIT was not cleared by Hardware.

DDR used is MT40A512M16LY-075E and is similar to DDR used in the FRWY Kit except for speed grade.

Is their any default timing settings?

Thanks in advance,

Tags (1)
0 Kudos
1 Solution
186 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to the attached QCVS DDR project, which I created using reading "From target" LS1046AFRWY, you could specify the workspace folder as "ddr_ls1046afrwy" to open this project.

View solution in original post

12 Replies
206 Views
yipingwang
NXP TechSupport
NXP TechSupport

When you create a QCVS DDRC project following new project wizards, in panel "DDR configuration", you could select "Configuration mode" according to your target board. 

If there is SPD on your target board, you could select Configuration mode as "Read SPD".

If there is no SPD, you could connect FRWYLS1046A demo board to CodeWarrior, boot up u-boot on FRWYLS1046A, then select "Configuration mode" as "From target" to create a QCVS DDRC project.  Double click "DDR_mc1:DDR" to open Properties panel, please modify parameters in this panel according to MT40A512M16LY-075E data sheet.

0 Kudos
202 Views
rashmikj
Contributor II

We have not procured this board. We are using LS1046ardb board.

Kindly help.

 

0 Kudos
187 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to the attached QCVS DDR project, which I created using reading "From target" LS1046AFRWY, you could specify the workspace folder as "ddr_ls1046afrwy" to open this project.

View solution in original post

162 Views
rashmikj
Contributor II

Thanks for the project. 

With this QCVS project , all the test are pass and also we are able read memory using Memory tab of the code warrior. We modified the values as per the project in atf/plat/nxp/ls1046ardb/ddr_init.c with CONFIG_STATIC_DDR enabled and compiled and fused pbl and fip.bin file. After this , it again stops at BL31 and uboot is not loading.

Also we are not able to read memory through code warrior.

Do i need to change any other files??

0 Kudos
148 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to the following procedure to use CodeWarrior to attach to your target board to do read memory 0x82000000 and let me know the result.

In CodeWarrior IDE, please create a bare board project from File->New->CodeWarrior Stationery, please build this project from Project->Build Project.

In "Target Connections" panel, please duplicate LS1046A_RDB and configure Target Connection Configuration(CodeWarrior TAP Connection).

Then click Debug->Debug Configurations->GDB Hardware Debugging-><project name>, please configure "Debugger" panel as the following.

yipingwang_0-1616572764687.png

Please configure Startup panel as the following

yipingwang_1-1616572793528.png

Then click "Debug" to connect to the target board, then click "suspend" in CodeWarrior IDE.

Then click Window->Show view->Memory, click "+“ to read memory 0x82000000, please check whether you could read similar content as the following.

yipingwang_2-1616572810181.png

 

 

0 Kudos
138 Views
rashmikj
Contributor II

Please find attached captured file .

0 Kudos
121 Views
yipingwang
NXP TechSupport
NXP TechSupport

On your target board, is DDR_CLK 1600MT/s? Did you modify static_1600 in plat/nxp/soc-ls1046/ls1046ardb/ddr_init.c?

0 Kudos
114 Views
rashmikj
Contributor II

DDR_CLK is 2100MT/s. we modified static_2100. I have attached the rcw file and uart log file with regs captured. After multiple attempts  we can debug uboot and it hangs after cpu_arch_init function in cpu.c file. Most of the times, debug does not happen. I have attached code warrior error window also.

 

0 Kudos
102 Views
yipingwang
NXP TechSupport
NXP TechSupport

Before read memory 0x82000000 in CodeWarrior IDE, you need to click "suspend button" to stop the CPU.

For u-boot debugging, you could refer to https://community.nxp.com/t5/CodeWarrior-for-QorIQ-Knowledge/Use-CodeWarrior-for-ARMv8-to-Debug-U-bo...

In addition, it seems that your target board is unstable, please try other custom board to do debugging.

 

0 Kudos
96 Views
rashmikj
Contributor II

I took dump of ddr memory from BL31 and it matches with uboot.bin. Yet uboot is not loading.

Tags (1)
0 Kudos
78 Views
yipingwang
NXP TechSupport
NXP TechSupport

According to your description, there is no problem in DDR initialization now, u-boot can start to execute. You could debug u-boot with CodeWarrior to find the exact place where u-boot stuck. 

In addition, it seems that your custom board is not stable, you could change to other custom board to do more verification. 

0 Kudos
73 Views
rashmikj
Contributor II

The issue was in rcw file. We had commented #include <usb_phy_freq.rcw> line in rcw as there is no usb in our custom card. After uncommenting the line uboot loading is okay.

Thanks for your help.

0 Kudos