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.

CC2652P: how to set the memory protect from sysconfig?

Part Number: CC2652P
Other Parts Discussed in Thread: CC1352P, SYSCONFIG

Hi Expert,

At some condition, my customer needs to write some data in specific address of internal memory as example below.

nvsinternal_CC1352P_2_LAUNCHXL_freertos_ticlang

They want to protect the specific address of internal memory and cannot be erased when upgrade fw from uart interface.

Can I know how to set below for memory sector protection in sysconfig?

DEFAULT_CCFG_CCFG_PROT_31_0

When I set the sector protected, I cannot write the data to protected memory address. How can I disable the protection in the code?

BR,

frank

BR,

frank

  • Hello Frank,

    What is the SDK version, and CCS version in use here?

    What is the exact memory address that you are trying to protect, is it within the section that is overwritten by syscfg?

    We may need to not set the sector to protected, let syscfg overwrite it, and then set the specific memory part of the sector back to your intended value with memset. 

    Thanks,
    Alex F

  • Alex,

     

    What is the SDK version, and CCS version in use here?

    What is the exact memory address that you are trying to protect, is it within the section that is overwritten by syscfg?

    I cannot find the memory protection setting from sysconfig.

    BR,

    frank

  • Hi Frank,

    I am afraid on CC2652 devices, the memory protection settings are not exposed by SysConfig.

    Memory settings protection are set through the file included at the end of the ti_devices_config.c file (generated by SysConfig):

    /*
     *  ======== Include Base Settings for device ========
     */
    
    #include <ti/devices/DeviceFamily.h>
    #include DeviceFamily_constructPath(startup_files/ccfg.c)
    

    Assuming you are using CC2652, the ccfg.c file is stored in <SDK>\source\ti\devices\cc13x2_cc26x2\startup_files.
    In order to change the configuration, you should

    • either modify the file I pointed to - in that case, it may produce code difficult to maintain across SDK migrations 
    • or modify the file generated by SysConfig (to do so, ensure to disable it generation by SysConfig) to add the flash protection settings you want

    I hope this will help,

    Best regards,