This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Am17xx SDRAM Initialisation problem

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

  • Hi Jeremy, check out this wiki: OMAP-L137 Bootloader

    It has a lot of suggestions you can try. The most likely issue would be the user vs supervisor mode where the pinmuxing is not able to be setup correctly. Do you see the correct values on the EMIFB pinmux registers?

    Jeff

  • Thanks Jeff - looks like it's the Supervisor mode preventing me from setting up the PINMUX registers. I hadn't realised the startup code put the ARM into User mode. I was being seduced by the fact that my code wasn't doing a lot yet, besides checking the SDRAM & dumping info out of the same UART it was booting off, and that it all kept working when I moved the pinmux & PSC initialisation from AIS into my code. Of course, the ROM bootloader was taking care of just enough of the pinmux-ing to allow those things to work because the AIS script told it to!