I am trying to configure DDR4 (MT40A256M16 - 5 discrete devices, one is for ECC) with T1022 processor using Lauterbach probe and the registers configuration generated by Codewarrior-QCVS
Codewarrior Version: 10.5.1.
QCVS Version 4.5.0
How I do that:
- Configure DDR4 on Codewarrior-QCVS.
- Generate code.
- Translate .tcl script generated by Codewarrior-QCVS to Lautebach PRACTICE script.
- Run Lauterbach script which detect the processor, configure the RCW, configure the UART and print to the console and configure the DDR4 Controller.
- I check that all registers are configured on the processor.
Once the registers are set in the DDR4 Controller and bit MEM_EN is set, DDR Error ACE turns on as you can see in the screenshot (TRACE_32-regs.jpg) attached. I know that the ACE bit means an error in the training process.
Also you can see some of the debug registers in the screenshot.
Q1: I would like to know why it is failing and if the DEBUG registers can give us more information. Could you provide that information?
In addition you can find attached the RCW (PBL.pbl) and the DDR register configuration (ddrCtrl_1.tcl).
I also tried without success:
- Reduce the clk freq from 800MHz to 650MHz
- Measurement of 1V2 and 0V6 voltage are OK.
- Check termination of MDICx signals are OK.
- Check clk presence OK.
Q2: Is there any example code to configure DDR4 available? It could be C code, I have uboot running, but failing when it reach the DDR configuration because is trying to read SPD.
Any help will be really appreciated.
Thank you.