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.

LP-CC1312R7: CCFG configuration modification after board boot

Part Number: LP-CC1312R7
Other Parts Discussed in Thread: CC1312R7, SYSCONFIG

Hi Team,

Currently we have developed solution which includes a custom bootloader and application.

both of the firmware flashed into internal flash, bootloader is flash higher range of memory address till the end of the flash.

As we know TI keeps CCFG at the end of the flash, so the ccfg configuration is the part of bootloader (it's included using ccfg.c).

Now we have situation where we want to modify one of the ccfg setting (CCFG_FORCE_VDDR_HH) once application gets control from custom bootloader.

right now we can not write from application to last sector of flash, because it comes under bootloader flashed memory area which is protected we don't want to give liberty to application to modify bootloder code.

Is there any solution we can use to modify the ccfg config? one extra reload to boot is also acceptable. 

Thanks,

Bhasker 

  • Any help will be appreciated!! 

  • Hi Bhasker,

    The Force VDDR setting is typically used only for the 14dbm setting on the CC1312r7 and is usually not configurable at run time. 

    What is the actual use case here? Is it to transmit at this transmit power or at a lower transmit power based on some logic? 

    Regards,

    Sid

  • Thanks Siddanth for reply!!

    currently we are using TI launchpad for the development and we have costume board where we need to set VDDR setting to 14dbm.

    As i mentioned above we have custom bootloader and ccfg settings are part of this custom bootloader and when we flash this bootloader to internal flash this setting also got written to last sector of flash and then eventually another application (which resides lower address of the flash) boots in the board.

    now as said - we have two boards in one we need 14dbm power another with default one and ccfg settings are done in custom bootloader.

    Is it possible from the other application which executes after custom bootloader, we can modify ccfg settings and then reload the board so that new ccfg will be apply.

    or I have to maintain two different custom bootloader one with 14db setting other with default??

    any pointer will be helpful.

    Thanks,

    Bhasker  

  • Hi Siddanth,

    Is it possible to configure VDDR setting at runtime and then reboot the board to apply the settings?

    Thanks,

    Bhasker 

  • Hi Bhasker, 

    Sorry for the delayed response.

    It is suggested not to modify CCFG settings at run time. It is recommended to write protect CCFG sector which you have rightly done so that it is indeed not overwritten by the application. 

    So, given that CCFG is expected to be write protected, it would not be possible to modify it from application. 

    Regards,
    Sid

  • Hi Siddanth,

    Thanks for reply!!

    right now we have one "ccfg.c" compiled with my custom bootloader written to last sector of flash.

    also i have one application there "ccfg.c" is getting compiled as part of "ti_devices_config.c" and this application is getting loaded using "jumpToPrgEntry(uint32_t prgEntry)" call.

    so my doubt is if i will modify ccfg setting in my application will that be overwritten? if that's the case my problem could be solved.

    Thanks,

    Bhasker 

     

  • Hi Bhasker, 

    The CCFG used should be the one that is in the last sector of the flash which is in your case a part of the bootloader. 

    This should not be overwritten by a new image. 

    For example, you can take a look at our BIM project and how our OAD works. The CCFG is always a part of the BIM project and not the application that is being downloaded. 

    https://dev.ti.com/tirex/explore/node?node=A__AMUyuBXNKfa6upwi5KJtuA__com.ti.SIMPLELINK_ACADEMY_CC13XX_CC26XX_SDK__AfkT0vQ__LATEST

    Regards,

    Sid

  • Thanks Sid for the reference,

    in my case I see application is compiling "ti_devices_config.c" which is generated from sysconfig tool contains "ccfg.c" files.

    will this file be ignored or it will override the ccfg area once BIM loads this application?

    Thanks,

    Bhasker 

  • There is no mechanism to automatically update the CCFG.

    Normally, in our default projects, the linker file is directed to place the ccfg object in the last area of the Flash. So once the app is compiled and loaded, the CCFG is located at the end and this is where the boot code expects it to be. 

    In our BIM-OAD projects. The CCFG is associated with the BIM project and is never overwritten even after OAD. 

    In your case, if the bootloader the original CCFG area is write protected, I would not expect the original CCFG to be overwritten. 

  • Thanks Sid,

    This pretty much answers my question!! one doubt why TI is not providing some API method to change "CCFG_FORCE_VDDR_HH" at run time?

    is there some future plan to do the same?

    Thanks,

    Bhasker 

  • Hi Bhasker, 

    The transmit power requirement is typically known before the boot. So the decision to use the boost mode(force vddr) or not to use the boost mode has been mostly done at compile time itself. 

    Also the device trims are performed by the device startup code by reading these CCFG values. Writing a flash bit from 1 to 0 is possible, but then you would have to erase to get a 0 to 1 transition. This adds more risk while handling CCFG area with writes and erases.

    So, I do not see us providing an API for this in the future. 

    Hope this helps.

    Regards,

    Sid

  • Thanks Sid!!