Hi,
There is a reliable way to determine if the DDR has been already initialized?
My bool loader reprogram the main PLL and initialize the DDR controller, then load the application.
Since I want to use the same build when starting from the boot loader and when starting in no-boot with CCS debug, my application should include the code to perform some initialization normally performed by the boot-loader:
- run directly from CCS (debug): initialize the DDR
- run from the boot loader (operative): don't reinit
- run from an older boot loader version that doesn't initialize the DDR
So far, I try to determine if the DDR works using a very simple memory test: I read two time the same location. If It read always the same value then the, DDR is initialized, otherwise it is not.
Is it this method reliable or it could give a wrong results (for instance, after a CPU reset, but not a DDR reset)?