PHY Configuration

Each PHY on the CC13x0 is configured by a combination of

  1. A Setup radio operation command,
  2. RF core firmware patches,
  3. RF core register overrides.

All these settings are generated using SysConfig (SmartRF Studio can also be used). 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. Each PHY has its own flavoured command. Usually, it programs basic configuration parameters like the modulation format and the symbol rate.

For the proprietary PHY, for instance, two different setup commands exist:

  • CMD_PROP_RADIO_SETUP can only be used when operating at 2.4 GHz as it does not contains the frequency divider setting needed for the sub-1 GHz band.
  • CMD_PROP_RADIO_DIV_SETUP can be used both in the Sub-1 GHz band and in the 2.4 GHz band.

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

../_images/aafig-ff906f2e833a6cfc10de60cd289506c91dd0e36c.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, for instance:

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 interpreted by the RF core firmware and therefore, their order is important. Several types exist:

  • overrides that write to internal hardware registers on the RF core
  • overrides that write to firmware parameters located in the RF core RAM

Overrides are usually taken as-is from SysConfig (or 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;