DDR Initialization in CodeWarrior example for LS1043A

cancel
Showing results for 
Search instead for 
Did you mean: 

DDR Initialization in CodeWarrior example for LS1043A

472 Views
j_wallace
Contributor II

Hello.

I run the CodeWarrior example named HelloWorld_C_Bare on LS1043ARDB and I am wondering how DDR is initialized.

I want to port the example to my custom board that should boot from a QSPI NOR flash. I think I have to modify the linker script with QSPI address where the software has been writen to: PROVIDE (___ROM_ADDRESS = 0x40100000); (Same value as PBI command for QSPI boot pointer).

But for now my question is How DDR in initialized in the HelloWorld example?

Best Regard. 

Labels (1)
0 Kudos
2 Replies

205 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello j_wallace,

DDR controller initialization has been done in CodeWarrior initialization file, please open Target Init File panel from Run->Debug Configuration->GDB hardware Debugging-><project name>->Debugger->Configure target connection, right click LS1043A_RDB to duplicate it as LS1043A_RDB(1), double click LS1043A_RDB(1) and click Target Init File panel. Please refer to "DDR Initialization" section in the CW initialization file.

Users need to customize DDR controller initialization section according to their custom boards. QCVS(DDRv) tool is recommended to use to calculate and optimize DDR controller configuration parameters.

Please refer to QCVS DDRv user manual from https://www.nxp.com/docs/en/user-guide/QCVS_DDR_User_Guide.pdf .


Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

205 Views
j_wallace
Contributor II

Hello,

Thanks for your reply. I have not CWTAP for now. I built the code under ROM configuration and writen the binary file in vBank4 using u-boot. 

In rom_init.c we can see this function:

void mem_init_hook()
{
    /* this method is called from runtime code for a ROM target */
    /* DDR initialization can be done here */

}

But nowhere actual DDR initialization, maybe this example is just usiing OCRAM...

Now my custom board is booting from QSPI but with errors. I will get back on the helloworld example later.

Best regards

0 Kudos