Hello,
could anybody please explain how to make DDR calibration or how to obtain calibration values?
I know there is DDR Stress Tester, but it gives no useful results.
I know there is the document AN4466 i.MX53 DDR Calibration and there are some example codes, but I don't know how to use it.
Do I need to make a program which I load to IRAM?
Thank you,
Karel
Solved! Go to Solution.
Hi Karel
please look at attached example.
Yes, you need to make a program which loads to IRAM.
Actually i.MX53 DDR calibration is rarely used, just because with
good DDR routing it is not necessary at all. It can just compensate small
timing shiftings, but not compensate overall bad DDR routing.
Best regards
chip
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
I just manage to do same things with i.mx6 so will post answer to Your question.
If You need DDR callibration You can use freescale tool: DDR stress tester as You said. In outputs there are results with few registers e.g. MMDC_MPWLDECTRL0 ch0 (0x021b080c) = 0x0036002D
Later when You build custom U-Boot (or Image) those values needed to be set. If You use embest u-boot: git://github.com/embest-tech/u-boot-imx.git -b embest_imx_3.0.35_4.0.0 in board/freescale/..../flash_header.s You have to put values from tool.
After You have Your u-boot prepared You can put it to board with official MFG_tool. Or If you work on Linux You can use imx_usb tool (not supported on this forum :smileygrin:)
DDR Stress for MX53 don't have outputs.
It is the reason to use the example (calibration.c) posted here.
So, the question is: How to use it?
SDRAM calibration procedures are described in the
following app note AN4466 : i.MX53 DDR Calibration.
http://cache.freescale.com/files/32bit/doc/app_note/AN4466.pdf
~igor
The question is not related to the procedures to calibrate or how to write the code.
My question is how to compile, load and run the program.
Hello igorpadykov
I followed the steps at the Integrating Processor Expert for i.MX and ARM GCC with Eclipse and I built a helloworld program.
I tested it at the user space and it run perfectly.
When I load it to iRAM, "data abort" appears and the board reboots automatically.
/* Log */
=> fatload mmc 0:1 0xF8000000 helloworld
reading helloworld
10174 bytes read in 17 ms (584 KiB/s)
=> go 0xF8000000
## Starting application at 0xF8000000 ...
data abort
pc : [<f8000028>] lr : [<8ff63fe8>]
reloc pc : [<df8a1028>] lr : [<77804fe8>]
sp : 8f55cd68 ip : 00000030 fp : 8f6dabc8
r10: 00000002 r9 : 8f55cec8 r8 : 00000000
r7 : 8f5622b0 r6 : f8000000 r5 : 00000002 r4 : 8f5622b4
r3 : f8000000 r2 : 8f5622b4 r1 : 8f5622b4 r0 : 00000000
Flags: nZCv IRQs off FIQs off Mode SVC_32
Resetting CPU ...
resetting ...
U-Boot 2015.04+fslc+g5d9ffd2 (Nov 11 2015 - 10:00:24)
Board: MX53 LOCO
I2C: ready
DRAM: 1 GiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1
In: serial
Out: serial
Err: serial
Net: FEC
Error: FEC address not set.
.......
Hi Karel
please look at attached example.
Yes, you need to make a program which loads to IRAM.
Actually i.MX53 DDR calibration is rarely used, just because with
good DDR routing it is not necessary at all. It can just compensate small
timing shiftings, but not compensate overall bad DDR routing.
Best regards
chip
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello igorpadykov
Can you explain how to use this example? (compilation, load to iram, execution...)
I don't have JTAG interface in my custom board.
Thanks.
Thank you for reply and the code. So I hope the calibration will not be necessary.
I'm currently using Linux and LTIB, so I don't know how to compile small program like this. Could you please point me to some info?
Or is there any compiled utility for calibration for i.MX53?