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.

CC2340R5: how to keep customed NVS region during debug?

Part Number: CC2340R5
Other Parts Discussed in Thread: SYSCONFIG,

Tool/software:

Hi teams,

I have made it via setting syscfg --> device configration --> flash protection settings, along with debug configration --> flash settings --> Chip erase(retain sectors specified in CCFG). As shown below.

It can work with the simplelink_lowpower_f3_sdk_8_10_01_02 sdk version.

But it will go wrong with the simplelink_lowpower_f3_sdk_7_40_00_64 sdk version.

Is it the right way to achieve this goal?  What is the suggested way and Why does it go wrong with the 7_40 sdk version?

Thanks!

  • Hi Connor,

    Testing with F3 SDK v8.10 SysConfig, "The four most significant bits of erase and retain main sectors must be set to one.  Otherwise, the SACI command to erase and retain main sectors will fail."  I have not tried the v7.40 SDK

    The value is a bitmask, from the TRM:

    These values would take effect after the CCFG is programmed with the valid settings.  Have you tried the "Skip Sectors during Program Load" option in the Debug Configuration instead?

    Regards,
    Ryan

  • Hi Ryan,

    The four most significant bits of erase and retain main sectors must be set to one.  Otherwise, the SACI command to erase and retain main sectors will fail.

    Thanks for your clarification! After I set "Erase/Retain, Main Sectors 32-255" to 0xFF000000, it works on the v7.40 SDK!
      

    The four most significant bits of erase and retain main sectors must be set to one.  Otherwise, the SACI command to erase and retain main sectors will fail.

    But I still want to confirm that in which part the TRM describes what you mentioned?

    Have you tried the "Skip Sectors during Program Load" option in the Debug Configuration instead?

    Sure, I have tried this to debug. But it go wrong with the below error.

    With my limited knowledge of the debugging, I am not sure whether I miss so other configration in CCS/syscfg.... 

    So, it's appreciated that you offer some guidance of the  "Skip Sectors during Program Load" option.

    Thanks so much.

  • But I still want to confirm that in which part the TRM describes what you mentioned?

    I don't know if it is explicitly outlined, but if each byte in the bitmask protects 8 sectors, where each sector is 0x800 bytes, then only the lower 28 bits are valid: (28*8 + 32)*0x800 = 0x80000 which is the entirety of the CC2340R5 flash.

    So, it's appreciated that you offer some guidance of the  "Skip Sectors during Program Load" option.

    Knowing that each sector is 0x800 bytes, what values did you enter into this field and are you sure that they align with your NVS region?

    Also, for debugging in CCS you could Launch a Target Configuration, load the project symbols, and connect to an active target without the need to re-program the device.  https://software-dl.ti.com/ccs/esd/documents/users_guide/ccs_debug-main.html#launching-a-debug-session 

    Regards,
    Ryan