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.

TMS320F28027: How to find all secure memory access violations with CSM password set?

Part Number: TMS320F28027

When I turn on the CSM by setting the password, the processor hangs and resets, because there are instructions executed out of unsecured memory that access secured memory.  This is an inherited project, and it seems that the previous developers didnt keep the proper variables in the proper memory.  So now its on me to get the CSM working, which means I need to find all of these violations, and fix them.  I've taken my build output, extracted the file names, and then used grep to search through all of those file for all ROM functions listed in the map file. The results show me that the only instances of ROM functions using memory that could be misplaced, are using the CTRL_Obj and the EST_Obj.  EST_Obj is automatically placed at 0x600, which is in RAMM0/M1, and I've adjusted my cmd file to place the CTRL_Obj in RAMM0/M1 as well.  This change allows me to get past my initial setup without hanging/resetting, but as soon as I initiate actual motor control, the processor hangs and resets.  I've used CsmUnlock() to verify that these hangs/resets are only due to the security violations.

I do have a handful of functions that get placed in RAM, but they are all in L0 SARAM, which is secure.  No functions execute out of RAMM0/M1.  If this is true, then the security violation can only be a ROM function that gets passed a pointer which points to secure RAM, right? 

How can I find all of these instances?

  • Hi.

    I do have a handful of functions that get placed in RAM, but they are all in L0 SARAM, which is secure.  No functions execute out of RAMM0/M1.  If this is true, then the security violation can only be a ROM function that gets passed a pointer which points to secure RAM, right?

    This look like the case. There is no easy way to find all such instance. You need to go through each function and check if there is any security violation. 

    Regards,

    Vivek Singh