A channel configuration structure, which defines the channel meaning when a channel number is passed into a RAIL function, e.g., sl_rail_start_tx() and sl_rail_start_rx().

A sl_rail_channel_config_t structure defines the channel scheme that an application uses when registered in sl_rail_config_channels().

These are a few examples of different channel configurations:

// 21 channels starting at 2.45 GHz with channel spacing of 1 MHz
// ... generated by Simplicity Studio (i.e., rail_config.c) ...
const uint32_t generated[] = { ... };
sl_rail_channel_config_entry_attr_t generated_entry_attr = { ... };
const sl_rail_channel_config_entry_t generated_channels[] = {
  {
    .phy_config_delta_add = NULL, // Add this to default configuration for this entry
    .base_frequency_hz = 2450000000,
    .channel_spacing_hz = 1000000,
    .physical_channel_offset = 0,
    .channel_number_start = 0,
    .channel_number_end = 20,
    .max_power_ddbm = SL_RAIL_TX_POWER_MAX,
    .p_attr = &generated_entry_attr,
  },
};
const sl_rail_channel_config_t generated_channel_config = {
  .phy_config_base = generated, // Default radio configuration for all entries
  .phy_config_delta_subtract = NULL, // Subtract this to restore the default configuration
  .p_entries = generated_channels,
  .length = 1, // There are this many channel configuration entries
};
const sl_rail_channel_config_t *channel_configs[] = {
  &generated_channel_config,
  NULL,
};
// ... in main code ...
// Associate a specific channel configuration with a particular RAIL instance.
sl_rail_config_channels(rail_handle, channel_configs[0]);

// 4 nonlinear channels
// ... in rail_config.c ...
const uint32_t generated[] = { ... };
sl_rail_channel_config_entry_attr_t generated_entry_attr = { ... };
const sl_rail_channel_config_entry_t generated_channels[] = {
  {
    .phy_config_delta_add = NULL, // Add this to default configuration for this entry
    .base_frequency_hz = 910123456,
    .channel_spacing_hz = 0,
    .physical_channel_offset = 0,
    .channel_number_start = 0,
    .channel_number_end = 0,
    .max_power_ddbm = SL_RAIL_TX_POWER_MAX,
    .p_attr = &generated_entry_attr,
  },
  {
    .phy_config_delta_add = NULL,
    .base_frequency_hz = 911654789,
    .channel_spacing_hz = 0,
    .physical_channel_offset = 0, // Since ch spacing = 0, offset can be 0
    .channel_number_start = 1,
    .channel_number_end = 1,
    .max_power_ddbm = SL_RAIL_TX_POWER_MAX,
    .p_attr = &generated_entry_attr,
  },
  {
    .phy_config_delta_add = NULL,
    .base_frequency_hz = 912321456,
    .channel_spacing_hz = 100000,
    .physical_channel_offset = 2, // Since ch spacing != 0, offset = 2
    .channel_number_start = 2, // ch 2 = base_frequency
    .channel_number_end = 2,
    .max_power_ddbm = SL_RAIL_TX_POWER_MAX,
    .p_attr = &generated_entry_attr,
  },
  {
    .phy_config_delta_add = NULL,
    .base_frequency_hz = 913147852,
    .channel_spacing_hz = 0,
    .physical_channel_offset = 0,
    .channel_number_start = 3,
    .channel_number_end = 3,
    .max_power_ddbm = SL_RAIL_TX_POWER_MAX,
    .p_attr = &generated_entry_attr,
  },
};
const sl_rail_channel_config_t generated_channel_config = {
  .phy_config_base = generated, // Default radio configuration for all entries
  .phy_config_delta_subtract = NULL, // Subtract this to restore the default configuration
  .p_entries = generated_channels,
  .length = 4, // There are this many channel configuration entries
};
const sl_rail_channel_config_t *channel_configs[] = {
  &generated_channel_config,
  NULL,
};
// ... in main code ...
// Associate a specific channel configuration with a particular RAIL instance.
sl_rail_config_channels(rail_handle, channel_configs[0]);

// Multiple radio configurations
// ... in rail_config.c ...
const uint32_t generated_0[] = { ... };
sl_rail_channel_config_entry_attr_t generated_0_entry_attr = { ... };
const sl_rail_channel_config_entry_t generated_0_channels[] = {
  {
    .phy_config_delta_add = NULL, // Add this to the default configuration for this entry
    .base_frequency_hz = 2450000000,
    .channel_spacing_hz = 1000000,
    .physical_channel_offset = 0,
    .channel_number_start = 0,
    .channel_number_end = 20,
    .max_power_ddbm = SL_RAIL_TX_POWER_MAX,
    .p_attr = &generated_0_entry_attr,
  },
};
const sl_rail_channel_config_t generated_0_channel_config = {
  .phy_config_base = generated_0, // Default radio configuration for all entries
  .phy_config_delta_subtract = NULL, // Subtract this to restore default configuration
  .p_entries = generated_0_channels,
  .length = 1 // There are this many channel configuration entries
};
const uint32_t generated_1[] = { ... };
sl_rail_channel_config_entry_attr_t generated_1_entry_attr = { ... };
const sl_rail_channel_config_entry_t generated_1_channels[] = {
  {
    .phy_config_delta_add = NULL,
    .base_frequency_hz = 2450000000,
    .channel_spacing_hz = 1000000,
    .physical_channel_offset = 0,
    .channel_number_start = 0,
    .channel_number_end = 20,
    .max_power_ddbm = -100, // Use this entry when TX power <= -10dBm
    .p_attr = &generated_1_entry_attr,
  },
  {
    .phy_config_delta_add = NULL,
    .base_frequency_hz = 2450000000,
    .channel_spacing_hz = 1000000,
    .physical_channel_offset = 0,
    .channel_number_start = 0,
    .channel_number_end = 20,
    .max_power_ddbm = 15, // Use this entry when TX power > -10dBm
                     // and TX power <= 1.5dBm
    .p_attr = &generated_1_entry_attr,
  },
  {
    .phy_config_delta_add = NULL,
    .base_frequency_hz = 2450000000,
    .channel_spacing_hz = 1000000,
    .physical_channel_offset = 0,
    .channel_number_start = 0,
    .channel_number_end = 20,
    .max_power_ddbm = SL_RAIL_TX_POWER_MAX, // Use this entry when TX power > 1.5dBm
    .p_attr = &generated_1_entry_attr,
  },
};
const sl_rail_channel_config_t generated_1_channel_config = {
  .phy_config_base = generated_1,
  .phy_config_delta_subtract = NULL,
  .p_entries = generated_1_channels,
  .length = 3,
};
const uint32_t generated_2[] = { ... };
sl_rail_channel_config_entry_attr_t generated_2_entry_attr = { ... };
const sl_rail_channel_config_entry_t generated_2_channels[] = {
  {
    .phy_config_delta_add = NULL,
    .base_frequency_hz = 2450000000,
    .channel_spacing_hz = 1000000,
    .physical_channel_offset = 0,
    .channel_number_start = 0,
    .channel_number_end = 20,
    .max_power_ddbm = SL_RAIL_TX_POWER_MAX,
    .p_attr = &generated_2_entry_attr,
  },
};
const sl_rail_channel_config_t generated_2_channel_config = {
  .phy_config_base = generated_2,
  .phy_config_delta_subtract = NULL,
  .p_entries = generated_2_channels,
  .length = 1,
};
const sl_rail_channel_config_t *channel_configs[] = {
  &generated_0_channel_config,
  &generated_1_channel_config,
  &generated_2_channel_config,
  NULL,
};
// ... in main code ...
// Create a unique RAIL handle for each unique channel configuration.
sl_rail_handle_t rail_handle_0 = SL_RAIL_EFR32_HANDLE;
sl_rail_init(&rail_handle_0, &rail_config_0, NULL);
sl_rail_handle_t rail_handle_1 = SL_RAIL_EFR32_HANDLE;
sl_rail_init(&rail_handle_1, &rail_config_1, NULL);
sl_rail_handle_t rail_handle_2 = SL_RAIL_EFR32_HANDLE;
sl_rail_init(&rail_handle_2, &rail_config_2, NULL);
// Associate each channel configuration with its corresponding RAIL handle.
sl_rail_config_channels(rail_handle_0, channel_configs[0]);
sl_rail_config_channels(rail_handle_1, channel_configs[1]);
sl_rail_config_channels(rail_handle_2, channel_configs[2]);
// Use a RAIL handle and channel to access the desired channel configuration entry.
sl_rail_set_tx_power_dbm(rail_handle_1, 100); // set 10.0 dBm TX power
sl_rail_start_rx(rail_handle_1, 0, &sched_info); // RX using generated_1_channels[2]
sl_rail_set_tx_power_dbm(rail_handle_1, 0); // set 0 dBm TX power
sl_rail_start_rx(rail_handle_1, 0, &sched_info); // RX using generated_1_channels[1]
sl_rail_start_rx(rail_handle_2, 0, &sched_info); // RX using generated_2_channels[0]

Public Attributes#

Base radio configuration for the corresponding channel configuration entries.

Minimum radio configuration to restore channel entries back to base configuration.

uint32_t

Signature for this structure.

uint32_t

Crystal Frequency for the channel config.

Public Attribute Documentation#

phy_config_base#

sl_rail_radio_config_t sl_rail_channel_config_t::phy_config_base

Base radio configuration for the corresponding channel configuration entries.


phy_config_delta_subtract#

sl_rail_radio_config_t sl_rail_channel_config_t::phy_config_delta_subtract

Minimum radio configuration to restore channel entries back to base configuration.


p_entries#

const sl_rail_channel_config_entry_t* sl_rail_channel_config_t::p_entries

Pointer to an array of sl_rail_channel_config_entry_t entries.


number_of_entries#

uint32_t sl_rail_channel_config_t::number_of_entries

Number of sl_rail_channel_config_entry_t entries.


signature#

uint32_t sl_rail_channel_config_t::signature

Signature for this structure.

Only used on modules.


xtal_frequency_hz#

uint32_t sl_rail_channel_config_t::xtal_frequency_hz

Crystal Frequency for the channel config.