I have an application running on a BF538 EZKIT, which makes use of the board's SDRAM. If I run the application using the Debug Agent emulator built into the EZKIT, SDRAM access works fine. But if I try to make the application boot from the EZKIT's flash, things go awry when I attempt to access the SDRAM.
I have initialization code created which initializes the SDRAM configuration registers, which is pointed to under the "load" page in the project configuration. I can tell that this code correctly runs when the board boots, additionally the code configures the PLL and the DSP is running at the correct clock frequency.
Here's the SDRAM initialization routine in the initcode:
// do dummy read to initialize SDRAM
Anyway, when accessing the SDRAM with the board booting from flash, writes seem to fail and the SDRAM always reads 0xFFB0.
Another clue is that all of the SDRAM/EBIU registers match between emulator-load and flash-boot scenario, with the exception of EBIU_SDSTAT - when everything's working on the emulator-loaded board, the register reads 0x0009 (before any SDRAM access) and 0x0001 (after SDRAM access). In the flash-boot scenario, EBIU_SDSTAT always reads 0x0019 - indicating that the SDRAM isn't "powered up yet" and the SDEASE error flag is set - and I can't find any documentation on what this flag means.
Blackfin silicon revision is 0.4, EZ-KIT Lite version is 1.2.
Any ideas? Thanks for any help!