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.

CC2652R: Dynamic/Runtime configuration of the CCFG flags

Part Number: CC2652R

Tool/software:

Hi,

Is it possible to dynamically (on runtime) configure these options?
Device would boot up, receive these configurations over UART and apply them.
These configurations are necessary because of the frequency offset in the radio output.

Configs vary across device models and we don't want to have multiple firmware files just for different configs.

// Apply cap-array delta
#define SET_CCFG_MODE_CONF_XOSC_CAP_MOD                 0x0
#define SET_CCFG_MODE_CONF_XOSC_CAPARRAY_DELTA          0xa

Thanks for the help

  • Hi Petar,

    It is possible to achieve what you are looking for, this functionality is accomplished through OSC_AdjustXoscHfCapArray.  You can store the target values for each device in a flash memory location during programming that is then used during device start-up.

    Regards,
    Ryan

  • Hi Ryan,
     
    Thanks for the response.
     
    The configuration cannot be in the flash memory in the production firmware. The configuration is received dynamically, during the firmware runtime.
    Configurations must be received after the device is booted up, application layer is started and the microcontroller receives the configuration over UART and then applies it.
    This approach doesn't save any configurations in the flash memory.
     
    I can however boot it up, receive the configurations over UART, write it to flash and force microcontroller to reset itself.
    Now the correct configurations would be applied, is this a valid approach?
     
    On which address in flash to store these configurations (on runtime)?
    SET_CCFG_MODE_CONF_XOSC_CAP_MOD
    SET_CCFG_MODE_CONF_XOSC_CAPARRAY_DELTA
     
    Kind regards,
    Petar

  • The device will start up using the CCFG settings which should not be altered outside of factory programming, so set these definitions as the best approximate values to begin with.  Every time your device starts up you will turn off the external high-frequency oscillator, poll the status until it is off, call OSC_AdjustXoscHfCapArray using values stored in the OSAL SNV, and then restore the HF XOSC.  Whenever you receive a new configuration over UART you should update the OSAL SNV application values and repeat the process described.

    Regards,
    Ryan