Hi again yipingwang,
Thank you for all the help.
I am trying to use ddrCtrl_1.py generated by QCVS as you suggested. I have copied its contents into my Target Initialization File. However, a new problem has arised: the new initialization does not exit the while loop in A009803_Erratum(). I am copying its contents below:
def A009803_Erratum():
DDR_BASE = 0x01080000
# 1. Configure the DDR registers as normal with parity enabled
CCSR_BE_M(0x01080114, 0x00401070 | 0x00000020)
# 2. Set ERR_DISABLE[APED]
CCSR_BE_M(0x01080E44, 0x00 | 0x00000100)
# 3. Set DDR_SDRAM_CFG[MEM_EN]
CCSR_BE_M(0x01080110, 0x65200000 | 0x80000000)
# 4. Poll for DEBUG_2[30] to be set
while True:
time.sleep(0.2)
debug_2_value = CCSR_BE_D(DDR_BASE + 0xF04)
if debug_2_value & 0x2 != 0:
break
# 5. Clear ERR_DIS[APED]. Parity checking is now enabled
CCSR_BE_M(0x01080E44, 0x00 & (0xFFFFFFFF ^ 0x00000100))
I understand that it is waiting for a certain value at register 0x1080F04. I have checked with UART writes at that point an the value is kept at 0x2100. I have also looked into LS146ARM but that address is not described in the manual. Should I skip that while loop?
Best regards