AnsweredAssumed Answered

Load and execute code from SD card

Question asked by chichkine.ivan on Sep 6, 2013
Latest reply on Sep 6, 2013 by fm
I want to store part of my code on an SD card and execute it whenever a certain event occurs. I've already figured out how to interface with an SD card so the problem now it getting the machine code into RAM and telling the MCU to execute it. Lets say I read the machine code from the SD card into a buffer first. How would I then go about telling the MCU to execute from the start address of the buffer? Are there any things I need to consider? Should the code be moved from the buffer to a specific address in RAM? (if so, how do I do that?). I've searched around this forum and wasn't able to find out how to do this. I expect it's as simple as changing the PC to the RAM address required, but I don't know how to do that. Any help is appreciated.