Tuning DDR3 configurations on iMX6Q board

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Tuning DDR3 configurations on iMX6Q board

6,863 次查看
PKZ
Contributor III

Hi,

We are using iMX6q and Micron DDR3 (2GB), designed based on Sabre SD. Currently our board fails the DDR_Stress test at 532MHz, some boards fail at even 528MHz. We try various configurations and calibrations, but the results are the same. But the Sabre SD can run up to 600MHz+ at room temperature.

Has anyone encountered such stability issues? Any suggestions?

Thanks.

PK

标签 (1)
标记 (1)
18 回复数

2,095 次查看
PKZ
Contributor III

Hi,

Can anyone please tell me which file in android bsp to change if I need to change the DDR speed and MCU speed?

The DDR stress test shows that no failure at 500MHz. So I am thinking to reduce the DDR speed in android and see how much performance degradation will occur.

Thanks in advance.

PK.

0 项奖励

2,095 次查看
frankmiller
Contributor IV

We've been having the same thoughts.  We've been running the stress tests on our boards to characterize at what speeds each boards memory fails.  We are seeing different failure speeds on different boards.

I have also been trying to reduce the memory speed in u-boot a couple of different ways.  First I thought to drop it all the way down to 396 MHz.  To do that tho, you need to actually use a different clk source for the DDR memory.  A Freescale engineer has given me a couple of pieces of code to try to reroute the clock source to the DDR3 but I haven't been able to make his code snippets work.

Second, I changed the clock speed in the DDR3 Configuration Spreadsheet that Freescale provides to generate values for flash_header.S for 500 MHz.  I programmed these new values and that causes our board to fail as well.

I'm not really sure what to do next.  I've heard from 3 other people having the same troubles.  We have had little communications from Freescale about this despite emails and message board posts.  Very frustrated right now.

0 项奖励

2,095 次查看
TomE
Specialist II

> We are seeing different failure speeds on different boards.

I'm getting the same thing on our DDR3 i.MX53 boards, but am currently more interested in the combination of high temperature that will cause the Memory Stress Test to fail at the normal memory frequency of 400MHz. This has shown up in our environment chamber testing.

We're getting some boards that fail at 400MHz with the CPU surface at 102C where others are still going at over 120C.

I've tried a few things, but the latest thing that caused a HUGE difference was to change the DSE (Drive Strength) setting for all the DRAM pins from "5" to "7". That should change the driver impedance from 48 to 34 ohms.

It has made a HUGE difference, more than anything else I've tried. The Stress Test is still running on our "worst board" at 470MHz with a CPU temperature of 126C!

I can't find anything in the Reference Manual, the big "i.MX53 System Development User’s Guide" or AN4466 on this. It tells me how to calibrate the impedances, but not how to SELECT the appropriate DSEs in the first place.

Is there any documentation detailing what hardware design parameters determine the best Drive Strength settings?

Does anyone have any general advice on this topic?

We have a (third party) board with only two DDR3 chips next to the CPU with very short track routing. I would have thought that lower Drive Strengths would be appropriate in this design.

Tom

0 项奖励

2,095 次查看
PKZ
Contributor III

Thanks FM.

Yeah, a colleague of mine also tried to change in u-boot and the board hang. I have not tried yet.

As for the DDR issues, you may check you layout again. We just found out that on our board, some of the traces are not match as per the guide line. The HW eng verified the matching using point-to-point measure feature in Altium. We found out that there is bug in Altium and the P-to-P measurement does not give the correct length. You can ask your HW engineer to manually measure the traces and verify if the it meets the design guide line.

Thanks.

PK

0 项奖励

2,095 次查看
frankmiller
Contributor IV

Are you running 1.2 GHz parts?

0 项奖励

2,095 次查看
PKZ
Contributor III

Hi Frank,

We are using 1 GHz part. We see failures when we run stress test at 528/532/537MHz. We do not have see failure at boot up but when we run Youtube video, the unit becomes too hot and  freezes, which i suspect because of memory. I am still testing stress test with different configuration.

Do you see failure with DDR stress test as well or is it during the boot up only? If it fails in DDR stress test, what freq? If not, may be running DDR stress test can eliminate if it's DDR issue or not.

Thanks

PK

0 项奖励

2,095 次查看
frankmiller
Contributor IV

Hi PK,

We have been running the memory stress tests as well.  We see failures at different frequencies with different boards.  I mentioned we have built 25 boards with 4 GB on each board.  Our design follows the SabreSD reference design closely.  We have run stress tests on about half a dozen boards now.  The one board we have that seems to work well fails the stress test at 621 MHz.  However, most of the boards fail at frequencies below 528 MHz.

Another interesting data point is that on our "golden board" we get the following values after calibration:

  DDR Freq: 396 MHz

   MMDC registers updated from calibration

   Read DQS Gating calibration
   MPDGCTRL0 PHY0 (0x021b083c) = 0x42230240
   MPDGCTRL1 PHY0 (0x021b0840) = 0x02260226
   MPDGCTRL0 PHY1 (0x021b483c) = 0x424B0255
   MPDGCTRL1 PHY1 (0x021b4840) = 0x025A0232

   Read calibration
   MPRDDLCTL PHY0 (0x021b0848) = 0x3D36383E
   MPRDDLCTL PHY1 (0x021b4848) = 0x403A3A40

   Write calibration
   MPWRDLCTL PHY0 (0x021b0850) = 0x37414240
   MPWRDLCTL PHY1 (0x021b4850) = 0x4433443E

  DDR Freq: 528 MHz

   MMDC registers updated from calibration

   Read DQS Gating calibration
   MPDGCTRL0 PHY0 (0x021b083c) = 0x4316032B
   MPDGCTRL1 PHY0 (0x021b0840) = 0x031A031C
   MPDGCTRL0 PHY1 (0x021b483c) = 0x433A033F
   MPDGCTRL1 PHY1 (0x021b4840) = 0x033F0326

   Read calibration
   MPRDDLCTL PHY0 (0x021b0848) = 0x43393C42
   MPRDDLCTL PHY1 (0x021b4848) = 0x413C3A45

   Write calibration
   MPWRDLCTL PHY0 (0x021b0850) = 0x3439423D
   MPWRDLCTL PHY1 (0x021b4850) = 0x442B443C

On one of the flakey boards, we get the following output after calibration:

  DDR Freq: 396 MHz

   MMDC registers updated from calibration

   Read DQS Gating calibration
   MPDGCTRL0 PHY0 (0x021b083c) = 0x421C0228
   MPDGCTRL1 PHY0 (0x021b0840) = 0x02250221
   MPDGCTRL0 PHY1 (0x021b483c) = 0x42480254
   MPDGCTRL1 PHY1 (0x021b4840) = 0x0251022A

   Read calibration
   MPRDDLCTL PHY0 (0x021b0848) = 0x4138393B
   MPRDDLCTL PHY1 (0x021b4848) = 0x3C3A3841

   Write calibration
   MPWRDLCTL PHY0 (0x021b0850) = 0x4041433F
   MPWRDLCTL PHY1 (0x021b4850) = 0x42324440

  DDR Freq: 528 MHz

   MMDC registers updated from calibration

   Read DQS Gating calibration
   MPDGCTRL0 PHY0 (0x021b083c) = 0x430D0319
   MPDGCTRL1 PHY0 (0x021b0840) = 0x03190316
   MPDGCTRL0 PHY1 (0x021b483c) = 0x4337033F
   MPDGCTRL1 PHY1 (0x021b4840) = 0x033F0317

   Read calibration
   MPRDDLCTL PHY0 (0x021b0848) = 0x44373A3C
   MPRDDLCTL PHY1 (0x021b4848) = 0x3E3C3945

   Write calibration
   MPWRDLCTL PHY0 (0x021b0850) = 0x353F433F
   MPWRDLCTL PHY1 (0x021b4850) = 0x422B443F

There are clearly different calibration values coming back for these two boards but I'm at a loss as to why.

Thanks,

FM

0 项奖励

2,095 次查看
Tarek
Senior Contributor I

Hi PK,

If the unit is getting too hot, I noticed that it drops the network link. Have you seen any Ethernet link up/down messages?

Check the temperature while you are playing video "cat /sys/class/thermal/thermal_zone0/temp"  You don't want to run in the hot (>80) or critical (>90) thermal zones. If that's your problem try using a heat sink or a fan.

I'm using a Sabrelite board and having a similar video freeze problem but it's not due to high temperature. I would like to test the DDR to see if it's causing the problem. Can you please provide the link to DDR_Stress_Test that you are using?

0 项奖励

2,095 次查看
AnsonHuang
NXP Employee
NXP Employee

Hi, Frank

     I saw you are asking whether this is caused by 1.2G parts, as far as I know, such DDR timing issue should not be related to CPU freq, as  in uboot, we only run CPU @792M, no matter it is 1GHz or 1.2GHz parts. This is my understanding, not sure whether it is right.

0 项奖励

2,095 次查看
frankmiller
Contributor IV

Hi Huang,

Thanks for the reply.

I was aware of this.  Most of the failures we're seeing are during kernel boot, just at the transition to user space, i.e. just after the Freeing init memory...  kernel message.  This is probably when the kernel transitions to the higher clock rate.  We also see a current spike on the power rails right about this time and on failed boards a spike in temperature.  I'm wondering if there are any issues with the 1.2 GHz parts that we did not see on our 1.0 GHz Dual core parts?

Thanks,

FM

0 项奖励

2,095 次查看
ajithpv
Contributor V

Hi,

Did you applied the DDR3 related patches from Freescale already ? If no, Please try to apply and see whether the tuning up of DDR3 getting proper.


Best Regards,

Ajith P V

0 项奖励

2,095 次查看
PKZ
Contributor III

Hi Ajithpv, which patches? I am running DDR_Stress_Test. I am not aware of any patches. Could you please send the link of patch? Thanks.

PK

0 项奖励

2,095 次查看
frankmiller
Contributor IV

We are having similar issues with the DDR3 stress tests on our custom board.  Did you resolve this problem?  What was your solution?

Thanks,

FM

0 项奖励

2,095 次查看
ajithpv
Contributor V

Hello PK,

If you have account in Freescale website, then probably you can do the following steps to get the patches.

1) Log-in to Freescale Semiconductor

2) Go to Products tab and then select Processors --> i.MX ARM Application Processors.

3) From the list of i.MX family comparison table, click on the "i.MX6Q: i.MX 6Quad Family of Applications Processors"

4) Then click on the Software & Tools tab.

5) Under Software & Tools tab, at bottom side, you can easily find a section named as "Updates and Patches (12)".

6) Expand it and select the most important  patches which suit for your requirement. Then download and apply the patch to your source code.

Best Regards

Ajith P V

0 项奖励

2,095 次查看
frankmiller
Contributor IV

Question, are these patches already part of the 4.0.0 release source or do you need to apply them to that code base?

Thanks,

FM

0 项奖励

2,095 次查看
Yuri
NXP Employee
NXP Employee

Please try to play with ODT settings.

2,095 次查看
PKZ
Contributor III

Hi Yuri, I have been trying with different ODT settings and also with different drive strength settings ( I have been working on this issue for more than a month), but the best I get is 532MHz on some of the boards. Any suggestion how to select the matching ODT?

Thanks.

0 项奖励