I'm playing around with the EVMAM1707 board pending production of our first Am1705-based prototype. I've been setting up some test code loading via UART bootloader mode to perform some basic initialisation to aid in initial hardware testing. My aim is to allow some experimentation with PLL & SDRAM speeds in the test code so our hardware devs can evaluate noise/performance issues, etc. on our prototype.
I'm having trouble initialising the SDRAM controller (EMIFB) with my own code. Using the AISgen tool to set up EMIFB works fine, but when I try to move the EMIFB initialisation to my code I can no longer access the SDRAM. I'm using the predefined values from AISgen for SDCFG, SDRFC, SDTIM1 & SDTIM2 in my code, and dumping the register values after initialisation seems to confirm that they're loaded OK, although obviously actual SDRAM access doesn't work. I've looked at the GEL setup file & the source for the UBL bootloader (from the DaVinci PSP SDK) and as far as I can see I'm using the same technique as both (I've basically just cloned the code!).
Frustratingly, if I slightly tweak the "canned" values in my init_EMIFB() function & call it after the bootloader has already initialised EMIFB, the SDRAM is still accessible! - so my function doesn't seem to break anything, it just isn't good enough to get things going on their own.
Any idea on what step(s) I might be missing?
TIA, Jeremy