Part Number: PROCESSOR-SDK-AM437X
Other Parts Discussed in Thread: AM4377
Hello E2E Community,
I have a problem with DDR initialization from the bootloader on a custom board (AM4377 based). My RAM is DDR3 MT41K256M16TW-107 AAT from Micron.
I have working GEL files for my board and all the test applications are working fine when when loaded from CCS with these GEL files.
Now I have to boot the application from the bootloader (SBL). I take the existing one as a referrence point, put my custom timings and configs and I have a problem!
In GEL files I have this line:
#define DDR3_SDRAM_CONFIG 0x61A213B2 //16-bit DDR3
//this write initiates and EMIF initialization and also latches values to PHY
WR_MEM_32(EMIF_SDRAM_CONFIG,DDR3_SDRAM_CONFIG);
In my bootloader I reproduce this with this code:
/* EMIF initialization and also latches values to PHY */
regVal = pDdrEmifCfg->sdramCfg;
HW_WR_REG32((SOC_EMIF_ADDRSP0_REG + EMIF_SDRAM_CONFIG), regVal);
But after that any write to SDRAM registers lead to the hang - the board is just stuck and not debuggable anymore.
If I comment this code out it goes further, my SDRAM is initialized, I can copy the application to RAM, I see that it is copied succesfully, but when I try to execute it - nothing happens.
My questions:
1. Is this step of EMIF initialization is realy important?
2. If after that the memory is readable/writibale - why the application in memory can't be executed?
3. How to debug after this point:
/* Giving control to the application */
pfnSBLAppEntry = (void (*)(void)) gSblEntryPoint;
(*pfnSBLAppEntry)( );
I pass the control to application and... what? I'm writing this and I understand that I have to set the H/W breakpoint to address 0x80000000 and see what's going wrong there =)
I will give it a try tonight...