I have a question regarding the CSM module. It's stated in the documentation that code running in unsecure memory cannot read/write to memory that is secure or from flash. How can I know if I have code running in unsecure memory?
I've checked my *.cmd and sections .cinit, .pinit, .text are in flash. The section ramfuncs is loaded from flash and running in RAML0, so secured memory. Does this mean that my code is running in secured memory?
IQTABLES, FPUTABLES and .stack are in unsecure memory. The code running in secure memory can read/write to memory that is unsecure?
Anything that is placed in flash or L0 RAM when security is enabled will be secure.
No just because ramfuncs is in L0 doesn't mean the reset of your code is running from secure memory. This only means ramfuncs is running from secure memory. If .text is in L0 or flash, then that means that your code is running from secure memory.
Yes secure code can read or write anywhere in the device (including flash), so if you wanted to do a secure re-flash you would want to execute the flash API from secure RAM (L0).
In reply to Trey German:
This means I can be sure the execution will not encounter any problems due to the impossibility to access some memory while locked.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.