iMX6SX changing DDR frequency

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iMX6SX changing DDR frequency

691 Views
Maddis
Contributor IV

First of all, I did check the old messages, but seemed that they were all something else than iMX6SX processor. Thus the question.

We have iMX6SX based product has has some problems passing EMC. We determined that slowing DDR from 400MHz to 316MHz would move the peaks enough that harmonics won't cause problem anymore.

Now the actual problem. I have excel sheet for iMX6SX that calculates the initialization values for DDR3. Problem with that is that the ddr clock is fixed at 400MHz and can't be changed. We had similar excel for iMX53 and there you could change the ddr clock too.

I did some digging from reference manual and find that from register CCM_CBCMR(0x020C 4018) you can select PFD2 by changing the PRE_PERIPH2_CLK_SEL field to 0b01. Then you can change the value in the CCM_ANALOG_PFD_528n(0x020C 8100) change the PFD2_FRAC from 0b011000 to 0b011100 (24 -> 30). I added both those writes to DCD in u-boot. 

Well, the device didn't boot after that (I was bit suspecting that) so I assume that is not how you do it or I need to do something else.

Question is that how do I do that frequency change or is there updated version of that excel that supports ddr freq change as well?

0 Kudos
2 Replies

686 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi, Maddis,

Follow steps below, please!

1. Using Register Programming Aid tool

download it from the link: https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX6SX-DDR3-Script-Aid/ta-p/1102580

It is in attachment.

[Note]

Fill your ddr3 parameters in the tool, and get a .inc file, by default, the file's name is realviewice.inc

2. Using i.mx6/7 ddr stress tester tool

Download the tool from the link: https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX-6-7-DDR-Stress-Test-Tool/ta-p/11082...

You can use : ddr_stress_tester_v3.00_setup.exe.zip, which can test and calibrate DDR on board via usb otg port, and it supports GUI on windows. After downloading it, install it on your windows PC.

[Note]

copy realviewice.inc file to "D:\Program Files\imx6-7-ddr-stress-tester\ddr_stress_tester_v3.00\script\mx6sx", this is just an example. probably your directory is different.

[note]

Start ddr stress tester, select the correct parameters and the script you just generated according to the prompts, and start calibration.

3. Modifying DDR cfg file in u-boot

After calibration, you will get registers configurations, then you can modify ddr cfg file in u-boot accoding to calibration result.

4. recompiling u-boot.

 

Hope this information is helpful to you.

Have a nice day!

B.R,

weidong

 

0 Kudos

683 Views
Maddis
Contributor IV

Hi,

That excel has the problem I described. You can't change the DRAM clock frequency in Register Configration - tab. It's fixed at 400MHz. Or is there some another way I'm not aware of? You can change wait states etc.. but not the base clock everything is running at.

0 Kudos