This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Execute code from RAM on Cortex-M3

Hello everybody!

This is my first post in this forum – and I’m very likely about to make an ass out of myself – so please bear with me. And I realize that this question has been asked about a million times before, but I haven’t found the answer to my problem yet.

First things first, my target is an Analog Devices ADuCM360 (Cortex-M3) and my toolchain is MDK-ARM Standard Cortex-M, version 5.23.

I’m trying to execute my ADC interrupt from RAM so that it won’t stall whenever I do any flash memory-related operations. The rest of my code lives in flash memory. I made sure to place the ADC interrupt handler code in its own file, so that I could have the Options->Properties->Memory Assignment page for that file point to RAM. I have also made a copy of the Vector Table in RAM, and I have set SCB->VTOR to point to this copy. As far as I can tell, all of this works as intended. I can see that the interrupt handler is placed in RAM. I can see that it is called correctly. I can alter the RAM copy of the Vector Table to point to other interrupt handlers and so on …

But for some reason that interrupt handler still gets stalled whenever I erase a page in the flash memory. I obviously missed something simple. Does anybody know what that might be?

Thanks! :-)