Other Parts Discussed in Thread: SYSBIOS
Hello All,
I have a question regarding reading Mode Register Contents of LPDDR4 memory that we use on our custom AM6548 based board.
Idea was to read specifically MR5 register which contains Manufacturer ID information.
Thus, we could use various DDR modules (but of the same characteristics) from several manufacturers (eg. Micron, ISSI etc.) and have a different DDR controller configuration for them if needed.
My configuration is:
CCS ver: 9.2.0.00013
PDK - pdk_am65xx_1_0_7 (processor_sdk_rtos_am65xx_6_03_00_106)
SYSBIOS - 6.76.3.01
I wanted to perform read of MR5 Mode register by issuing Mode Register Read command to the LPDDR4 module.
In order to do so I used write/read to DDRCTL_MRCTRL0, DDRCTL_MRCTRL1 and DDRCTL_MRSTAT registers inside PDK's \packages\ti\board\src\cbsKeystone3\board_ddr.c file.
Specifically, I entered the following lines after call to DDR_Controller_PHY_Config() inside Board_DDRInit(void) function:
while(HW_RD_REG32(CSL_DDRSS0_CTL_CFG_BASE + CSL_EMIF_CTLCFG_MRSTAT) & 0x01) {}
HW_WR_REG32(CSL_DDRSS0_SS_CFG_BASE + CSL_EMIF_CTLCFG_MRCTRL0,0x00000011);
boardDDRDelay();
while(HW_RD_REG32(CSL_DDRSS0_CTL_CFG_BASE + CSL_EMIF_CTLCFG_MRSTAT) & 0x01) {}
HW_WR_REG32(CSL_DDRSS0_SS_CFG_BASE + CSL_EMIF_CTLCFG_MRCTRL1,0x00000500);
boardDDRDelay();
while(HW_RD_REG32(CSL_DDRSS0_CTL_CFG_BASE + CSL_EMIF_CTLCFG_MRSTAT) & 0x01) {}
HW_WR_REG32(CSL_DDRSS0_SS_CFG_BASE + CSL_EMIF_CTLCFG_MRCTRL0,0x80000011);
boardDDRDelay();
while(HW_RD_REG32(CSL_DDRSS0_CTL_CFG_BASE + CSL_EMIF_CTLCFG_MRSTAT) & 0x01) {}
s32DdrId = HW_RD_REG32(CSL_DDRSS0_CTL_CFG_BASE + CSL_EMIF_CTLCFG_MRCTRL1) & 0xFF;
Here I first wait for previous Mode Register Read command to be completed and then configure MRCTRL0 register with command set to MRR and rank zero.
Address (0x5) is loaded in MRCTRL1 (bits [15:8]) and then I issue a Mode Register Read command and read result from MRCTRL1 register.
I also tried inserting the same lines after DDR training was successfully completed in Board_DDRInit(void).
However, I always get zero value read zero in data bits ([7:0]) from CSL_EMIF_CTLCFG_MRCTRL1 register.
Micron LPDDR4 that we are currently using is correctly configured and we performed successful memory tests and are running the code from DDR withut any problems.
Can somebody give me a hint what am I doing wrong here?
Best regards,
Milan