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.

Problem with activating CSM on Piccolo F28069

Other Parts Discussed in Thread: CONTROLSUITE

Hi,

I am having problems activating CSM on F28069 using CCS v5.3. My application code is about 32K, data 4K, CLA program and data almost full, and I use two flash sectors for user data (using Flash2806x API) Almost all my code runs from RAM. I think, all my data is in unsecured area so I should be able to run code from anywhere. My application runs without passwords or with passwords when my code unlocks the CSM when it starts. It does not run if I remove the code that unlocks it.

How can I figure out what is the problem? Is it for sure accessing secured area from unsecured code? Is there anything special regarding CLA code/data and CSM? Anything special about using the flash API besides supplying the password through _PRG_keyX?

Thank you in advance!

 

  • Vesko Vitchev said:
    I think, all my data is in unsecured area

    Vesko Vitchev said:
    How can I figure out what is the problem? Is it for sure accessing secured area from unsecured code?

    From the description, It sounds like this is a likely cause.  I suggest taking a look a the generated memory map (file .map - usually found in the Debug directory where the .out file is) to see if you can spot any data that is in secure memory.  Likewise any code that is running from unsecure that may be accessing it. 

  • Thank you Lori,

    That is the only thing that makes sense to me and that's what I've been doing last days with only partial success, if any.

    There are still a few questions I could not find an answer for:

    1. Is the CLA affected at all by CSM? I guess no, since all its code is in secured memory, but is it really true?

    2. Is there a general description of the standard libraries with information about what are the code and data sections used? For example, some of the functions in FPU library most probably use the FPUMathTables section. How one knows which functions use this section and which do not?

    In summary, are there any detailed rules, or guidelines, or utilities to help deciding what is the best structuring of code and data in secured/unsecured memory and how to achieve that?

    Thanks again!

    Vesko

  • Vesko Vitchev said:
    1. Is the CLA affected at all by CSM? I guess no, since all its code is in secured memory, but is it really true?

    You are correct.  The CLA program runs from secure memory.  Program running from secure memory can access both secure and unsecure. 

    Vesko Vitchev said:
    2. Is there a general description of the standard libraries with information about what are the code and data sections used? For example, some of the functions in FPU library most probably use the FPUMathTables section. How one knows which functions use this section and which do not?

    I checked the fastRTS library documentation and seems that this information is missing from there.  I'll file an enhancement request to have it added.   The info is, however, in the boot ROM section of the Technical Reference Manual (sin/cos/atan/exp lookup tables).   The ROM is not secure, though so If you are using the copy in the ROM the data is available to both secure and unsecure code.

  • Vesko Vitchev said:
    In summary, are there any detailed rules, or guidelines, or utilities to help deciding what is the best structuring of code and data in secured/unsecured memory and how to achieve that?

    Stack will be used with any function so it would be unsecure unless all of your code is secure.

    Otherwise it is very application dependent and depends what code and data you wish to be unreadable by someone else (secure).  One option is to start moving data sections that are in secure memory into unsecure to narrow down the issue to a particular seciton.

  • Sorry for hijacking this thread but I am working on similar task for the 28069. I know I must put the Flash API in RAM when I turn on CSM but where can I find the correct Flash API lib file? I went through this issue successfully with the 28027, which uses the file "Flash2802x_API_V201.lib" available in controlSUITE, but I could not find one for the 28069. I noticed all other 28xxx parts have "the file" but the 2806x. Am I missing something?

    Thanks,