Proprietary PHY Configuration

The proprietary PHY is configured via a combination of

  1. setup radio operation command
  2. RF core firmware patches
  3. RF core register overrides.

All these settings are usually exported from Smart RF Studio into C source files, also called »smartrf_settings«. This section explains the necessary basics for understanding these files and for making minor tweaks.

When using the RF driver, all 3 parts, the setup command, patches and overrides are used as parameters for RF_open():

RF_open(&rfObject, &RF_prop, (RF_RadioSetup*)&RF_cmdPropRadioDivSetup, NULL);

Read more on setting up the RF core:

Setup command

The setup command is the first radio operation that is posted to the RF core after power up. Two different setup commands exist for the proprietary PHY:

  • CMD_PROP_RADIO_SETUP is used on the CC13X0 family when operating at 2.4 GHz.
  • CMD_PROP_RADIO_DIV_SETUP is used on the when operating in the Sub-1 GHz band. It contains additional frequency divider settings that are not needed for the 2.4 GHz band.

The relationship of both commands is shown in the following image.

../_images/aafig-6d23f5753c13cdec406ffcd4e81baa27cf52c8f4.png

Patches

Patches are additions to the RF core firmware. The CC13X0 family is shipped with a RF core firmware in ROM. Whenever an issue is observed, additional features are added or a new chip revision is published, some firmware changes might become necessary. Patches are provided as binary blob for the CPE, MCE and the RFE. They are part of the device-specific content in the SimpleLink CC13X0 SDK. Patches are loaded into the RF core RAM when powering up the RF core. The RF driver combines pointers to all patches in a structure called RF_Mode:

RF_Mode RF_prop =
{
    // ...
    .cpePatchFxn = &rf_patch_cpe_genfsk,    // Command and Packet Engine
    .mcePatchFxn = 0,                       // Modem Control Engine
    .rfePatchFxn = &rf_patch_rfe_genfsk,    // Radio Front-end Engine
    // ...
};

Overrides

Overrides contain additional configuration settings for the RF core firmware that are not part of the setup command. They are written into the RF core RAM and can be seen as variables of the RF core firmware. Overrides are usually taken as-is from SmartRF Studio. They are gathered in a 1-dimensional array of integers that is terminated by 0xFFFFFFFF and then linked to the pRegOverride parameter in the setup command:

// Overrides for CMD_PROP_RADIO_DIV_SETUP
static uint32_t pOverrides[] =
{
    // 0: Run MCE firmware from ROM.
    // 4: Run MCE firmware from ROM bank 4.
    // 0: Use MCE firmware in mode 0. Sometimes, a patch provides more than one operation mode.
    // 1: Run RFE firmware from RAM (use the patch instead of the ROM.
    // 0: Does not apply, since RFE firmware runs from RAM.
    // 0: Run RFE firmware in mode 0.
    MCE_RFE_OVERRIDE(0,4,0,1,0,0),
    // ...
    // Termination value
    (uint32_t)0xFFFFFFFF
}

RF_cmdPropRadioDivSetup.pRegOverride = &pOverrides;

The order of overrides is not important in general. Only the RTRIM override value must be placed within the first 5 entries:

// override_synth_prop_863_930_div5.xml
// Synth: Set recommended RTRIM to 7
HW_REG_OVERRIDE(0x4038,0x0037)