Skip to content

Create DDR Training File

Edwin edited this page Dec 27, 2018 · 2 revisions

Create DDR Training File

Just like iMX6, in board/ folder, we can change or tuning DRAM parameters ourself,
With official DDR stress tool, we can create 2 files, ddr_init.c and ddrphy_train.c
which already existed in uboot/board/freescale/imx8mq_evk/ddr,
change the DRAM parameter and do some optimization.

DDR Stress Tool (Windows 7/8/10)

1. Setup Hardware

Setup the board, and connect both debug port and typeC to your computer. board


Setup boot mode pin to __SerialDownloader__ mode,
and switch boot device to SD card (None eMMC)

bootmode bootdev

2. Connect and Load DDR Script

Press Search button to refresh comport list, and press Connect button to link to your board.
Load DDR Script that you created or customized.
Here I used sample script provide by NXP.
load

3. Download, Calibration and Gen Code

Press Download button to write the register to the iMX8 board.
download
Press Calibration button to training the DRAM.
cal
If Calibration passed, Gen code button will be available.
Press Gen Code button to create ddr_init.c and ddrphy_train.c files
files

4. Replace DDR source code

Replace ddr_init.c and ddrphy_train.c in uboot/board/freescale/imx8mq_evk/ddr and make uboot with new parameter!



Have Fun!