Understanding the SAM ARM static memory controller and mapping

I've been reading the datasheet for the SAM3X chip used on the Arduino DUE to explore and learn more about the static memory controller.

The reason i want to learn this is because I'm looking to built a small application that can load complied .BIN sketches from an SD card into a NOR Flash then execute from the NOR flash, once finished jump back to the code in the internal memory.

The chip has external memory mapping

0x60000000-0x60FFFFFF Chip Select 0 (16 MB) Read-write
0x61000000-0x61FFFFFF Chip Select 1 Read-write
0x62000000-0x62FFFFFF Chip Select 2 Read-write
0x63000000-0x63FFFFFF Chip Select 3 Read-write

once the config bits are set to tell the SMC that their is a device on Chip Select 0 (Bank 0), is it the same as just the standard C malloc to write directly to this memory address from the SD card the use:

void (*appcode)(void) = 0x60000000;
cli ();

to jump and execute the code on the NOR Flash

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.