LPC43xx running from (external) SDRAM
Hi All,
From what I read in the user manuals and package info, all I need to do to get code downloading to, and running from, SDRAM is change the section placement in the project option to SDRAM.
If I create a new project from any of the LPC43XXX that support external SDRAM, change the section placement to SDRAM, the project fails to build, with an UNPLACED_SECTIONS error.
All the crossworks examples in the LPC4300 and embest LPC4357 fail to link with an overflow of the UNPLACED_SECTIONS, when I change the placement to SDRAM.
The Reset script and section placement files change in the project, so its doing something
What am I missing here?
thanks
Mark
-
I know this is old, but in the interest of posterity...you're missing more than section placement. You also need to configure pins, clocks, and the EMC peripheral via the debugger. I use a custom reset script for an SDRAM only build.
You probably want to think twice about running from SDRAM on this part. Bus arbitration is almost non-existent as is cache. There is a simply priority scheme per the manual. A while(1) in your idle task will almost entirely consume the bus, blocking other transfers you'd want to occur, like ethernet DMA transfers.
function SDRAMReset(core)
{
TargetInterface.pokeWord(0xE000EDF0, 0xA05F0003); // set C_HALT and C_DEBUGEN in DHCSR
TargetInterface.waitForDebugState(1000);// Bit 17 of CREG is reserved. No idea what they are doing here.
TargetInterface.pokeWord(0x4004312C, TargetInterface.peekWord(0x4004312C)|(1<<17)); // Power up RNG
// Configure memory map to point to SDRAM
TargetInterface.pokeWord(0x40043100, 0x28000000); // set M4MEMMAP to SDRAMTargetInterface.pokeWord(0xE000EDFC, 0x1); // set VC_CORERESET in DEMCR
// Chip ERRATA - this will not reset the peripherals as they should
TargetInterface.pokeWord(0xE000ED0C, 0x05FA0004); // set SYSRESETREQ in AIRCR
TargetInterface.waitForDebugState(1000);SDRAMConfigureEMCPins();
SDRAMConfigureClocks();
SDRAMConfigureEMC();
SDRAMConfigureSPIFIPins();
}
Please sign in to leave a comment.
Comments
1 comment