Hi,Sir!
The total size (Code size and data size) of my project is less then 68K bytes, so I want to load all code from flash memory into internal RAM. is it OK? how to deal with secure zone and non-secure zone?
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.
Hi,Sir!
The total size (Code size and data size) of my project is less then 68K bytes, so I want to load all code from flash memory into internal RAM. is it OK? how to deal with secure zone and non-secure zone?
There is no reason you cannot do this. Not sure I see much advantage to putting everything in RAM though. I'd think copying just your main code routines would be enough. Leave the initialization code alone in flash. I mean, what are you concerned about with the flash? Execution speed?
Yes, you will need to be careful about secure and non-secure memory, IF you enable the CSM module. Most of the internal RAM is non-secure, so you could only protect a small piece of your code anyway. All the other code would be in non-secure RAM, and could not access data in any secure memory.
Chapter 4 of appnote SPRA958 should help with the flash to RAM copy.
Regards,
David
Running in internal RAM is more faster than in Flash, because my code is very time critical, 10us loop control for digital power.