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.

LAUNCHXL-F280025C: Problem Copy Secure Functions from Flash To Ram results in illegal operation

Part Number: LAUNCHXL-F280025C
Other Parts Discussed in Thread: UNIFLASH

Hi

coming from this Thread:

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1179106/tms320f280025c-copy-secure-functions-from-flash-to-ram-in-tms320f280025c

the FLASH SECTOR 6 and the RAMLS5 are EXEONLY:

And both in the same secure zone - zone 2. this was taken from f28002x_dcsm.asm:

when the functions run from the secure flash sector (6), everything is working fine. 

How the copy functions will help? even if they copy the functions how the program would know from where to run them? they will still run from the secure flash (SECTOR 6) . I need somehow that the program

will run the functions from the secure RAM (RAMLS5). I know that this type of things is configured in the .cmd file. I tried that and saw the functions located in RAMLS5 but 

when the program reaches one of those functions it will jump to illegal operation interrupt.

Thanks

Yoav

  • Hi Yoav,

    Having the value 1 in the  B0_Z2_EXEONLYSECTR means that the EXEONLY is disabled. You need to program these fields as 0 to make the Flash sector and RAM as EXEONLY. Please give it a shot after configuring them as EXEONLY.  

    Thanks & Regards

    Pramod

  • Hi Pramod

    Thanks fore the reply.

    How I configure the EXEONLY ram/flash? I can see the functions that can read the status like this:

    DCSM_EXEOnlyStatus
    DCSM_getZone2RAMEXEStatus(DCSM_RAMModule module)
    {
        DCSM_EXEOnlyStatus status;
    
        //
        // Check if module belongs to this zone
        //
        if(DCSM_getRAMZone(module) != DCSM_MEMORY_ZONE2)
        {
            status = DCSM_INCORRECT_ZONE;
        }
        else
        {
            //
            // Get the EXE status of the RAM Module
            //
            status = (DCSM_EXEOnlyStatus)((HWREGH(DCSMBANK0_Z2_BASE +
                   DCSM_O_Z2_EXEONLYRAMR) >> (uint16_t)module) & (uint16_t)0x01U);
        }
        return(status);
    }

    are there functions that sets the EXEONLY ram/flash? or I need to write manually to the address? if that

    is the case can you give me an example on how to do that because I tried this:

    changing from 0x0F to 0x0D (setting RAMLS5 to 0):

      

     and it didn't change the value.

    Thanks

    Yoav

  • Hi Yoav,

    These values cannot be directly written via CCS. The EXEONLY bits are a part of other security configuration settings which you make in the OTP as part of the ZSBs. You need to use the Flash programming tools for the same (Flash API/ CCS Flash plugin/ UniFlash) which you have used to change other DCSM settings  

    Let me know once the settings change will resolve your issue. 

    Thanks & Regards

    Pramod

  • Hi Pramod

    if this is an OTP area it means that I cant change the status of these sector/ram EXEONLY state?

    Thanks

    Yoav

  • Hi Yoav,

    Yes. This is the OTP area which means once programmed, you cannot reprogram. As I see in this case, the EXEONLY setting by default is not configured. So you can still go ahead and program the OTP to change the EXEONLY setting for the RAM/Flash. 

    However, we have something called as Zone Select Blocks (I believe you are already aware of this) which are more like multiple copies of the security settings. You can configure the Linkpointer in order to choose which Zone Select block's security settings should take effect. This method will provide you to modify the security settings more than once even though the settings are part of OTP. Please go through the DCSM chapter in the device TRM (https://www.ti.com/lit/ug/spruin7a/spruin7a.pdf) for more details on the same. 

    Please try out the DCSM Tool that we have as part of SYSCFG which will help you make the above security settings with ease. Here is the documentation for the same. (https://www.ti.com/lit/an/spracp8a/spracp8a.pdf) and tool is supported for F28002x as well.

    Let me know if you have any further questions on this thread. Feel free to open new threads for any new queries that you need resolution. 

    Hope this helps. 

    Thanks & Regards

    Pramod

  • Hi Parmod

    Thank you for your help. Its working.

    Thanks

    Yoav