RAIL_ChannelConfig_t Struct Reference

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

#include <rail_types.h>

Data Fields

const uint32_t * phyConfigBase
 Base radio configuration for the corresponding channel configuration entries.
 
const uint32_t * phyConfigDeltaSubtract
 Minimum radio configuration to restore channel entries back to base configuration.
 
const RAIL_ChannelConfigEntry_tconfigs
 Pointer to an array of RAIL_ChannelConfigEntry_t entries.
 
uint32_t length
 Number of RAIL_ChannelConfigEntry_t entries.
 
uint32_t signature
 Signature for this structure.

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

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

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[] = { ... };
RAIL_ChannelConfigEntryAttr_t generated_entryAttr = { ... };
const RAIL_ChannelConfigEntry_t generated_channels[] = {
{
.phyConfigDeltaAdd = NULL, // Add this to default configuration for this entry
.baseFrequency = 2450000000,
.channelSpacing = 1000000,
.physicalChannelOffset = 0,
.channelNumberStart = 0,
.channelNumberEnd = 20,
.maxPower = RAIL_TX_POWER_MAX,
.attr = &generated_entryAttr
},
};
const RAIL_ChannelConfig_t generated_channelConfig = {
.phyConfigBase = generated, // Default radio configuration for all entries
.phyConfigDeltaSubtract = NULL, // Subtract this to restore the default configuration
.configs = generated_channels,
.length = 1 // There are this many channel configuration entries
};
const RAIL_ChannelConfig_t *channelConfigs[] = {
&generated_channelConfig,
NULL
};
// ... in main code ...
// Associate a specific channel configuration with a particular RAIL instance.
RAIL_ConfigChannels(railHandle, channelConfigs[0]);
// 4 nonlinear channels
// ... in rail_config.c ...
const uint32_t generated[] = { ... };
RAIL_ChannelConfigEntryAttr_t generated_entryAttr = { ... };
const RAIL_ChannelConfigEntry_t generated_channels[] = {
{
.phyConfigDeltaAdd = NULL, // Add this to default configuration for this entry
.baseFrequency = 910123456,
.channelSpacing = 0,
.physicalChannelOffset = 0,
.channelNumberStart = 0,
.channelNumberEnd = 0,
.maxPower = RAIL_TX_POWER_MAX,
.attr = &generated_entryAttr
},
{
.phyConfigDeltaAdd = NULL,
.baseFrequency = 911654789,
.channelSpacing = 0,
.physicalChannelOffset = 0, // Since ch spacing = 0, offset can be 0
.channelNumberStart = 1,
.channelNumberEnd = 1,
.maxPower = RAIL_TX_POWER_MAX,
.attr = &generated_entryAttr
},
{
.phyConfigDeltaAdd = NULL,
.baseFrequency = 912321456,
.channelSpacing = 100000,
.physicalChannelOffset = 2, // Since ch spacing != 0, offset = 2
.channelNumberStart = 2, // ch 2 = baseFrequency
.channelNumberEnd = 2,
.maxPower = RAIL_TX_POWER_MAX,
.attr = &generated_entryAttr
},
{
.phyConfigDeltaAdd = NULL,
.baseFrequency = 913147852,
.channelSpacing = 0,
.physicalChannelOffset = 0,
.channelNumberStart = 3,
.channelNumberEnd = 3,
.maxPower = RAIL_TX_POWER_MAX,
.attr = &generated_entryAttr
},
};
const RAIL_ChannelConfig_t generated_channelConfig = {
.phyConfigBase = generated, // Default radio configuration for all entries
.phyConfigDeltaSubtract = NULL, // Subtract this to restore the default configuration
.configs = generated_channels,
.length = 4 // There are this many channel configuration entries
};
const RAIL_ChannelConfig_t *channelConfigs[] = {
&generated_channelConfig,
NULL
};
// ... in main code ...
// Associate a specific channel configuration with a particular RAIL instance.
RAIL_ConfigChannels(railHandle, channelConfigs[0]);
// Multiple radio configurations
// ... in rail_config.c ...
const uint32_t generated0[] = { ... };
RAIL_ChannelConfigEntryAttr_t generated0_entryAttr = { ... };
const RAIL_ChannelConfigEntry_t generated0_channels[] = {
{
.phyConfigDeltaAdd = NULL, // Add this to the default configuration for this entry
.baseFrequency = 2450000000,
.channelSpacing = 1000000,
.physicalChannelOffset = 0,
.channelNumberStart = 0,
.channelNumberEnd = 20,
.maxPower = RAIL_TX_POWER_MAX,
.attr = &generated0_entryAttr
},
};
const RAIL_ChannelConfig_t generated0_channelConfig = {
.phyConfigBase = generated0, // Default radio configuration for all entries
.phyConfigDeltaSubtract = NULL, // Subtract this to restore default configuration
.configs = generated0_channels,
.length = 1 // There are this many channel configuration entries
};
const uint32_t generated1[] = { ... };
RAIL_ChannelConfigEntryAttr_t generated1_entryAttr = { ... };
const RAIL_ChannelConfigEntry_t generated1_channels[] = {
{
.baseFrequency = 2450000000,
.channelSpacing = 1000000,
.physicalChannelOffset = 0,
.channelNumberStart = 0,
.channelNumberEnd = 20,
.maxPower = -100, // Use this entry when TX power <= -10dBm
.attr = &generated1_entryAttr
},
{
.phyConfigDeltaAdd = NULL,
.baseFrequency = 2450000000,
.channelSpacing = 1000000,
.physicalChannelOffset = 0,
.channelNumberStart = 0,
.channelNumberEnd = 20,
.maxPower = 15, // Use this entry when TX power > -10dBm
// and TX power <= 1.5dBm
.attr = &generated1_entryAttr
},
{
.phyConfigDeltaAdd = NULL,
.baseFrequency = 2450000000,
.channelSpacing = 1000000,
.physicalChannelOffset = 0,
.channelNumberStart = 0,
.channelNumberEnd = 20,
.maxPower = RAIL_TX_POWER_MAX, // Use this entry when TX power > 1.5dBm
.attr = &generated1_entryAttr
},
};
const RAIL_ChannelConfig_t generated1_channelConfig = {
.phyConfigBase = generated1,
.phyConfigDeltaSubtract = NULL,
.configs = generated1_channels,
.length = 3
};
const uint32_t generated2[] = { ... };
RAIL_ChannelConfigEntryAttr_t generated2_entryAttr = { ... };
const RAIL_ChannelConfigEntry_t generated2_channels[] = {
{
.baseFrequency = 2450000000,
.channelSpacing = 1000000,
.physicalChannelOffset = 0,
.channelNumberStart = 0,
.channelNumberEnd = 20,
.maxPower = RAIL_TX_POWER_MAX,
.attr = &generated2_entryAttr
},
};
const RAIL_ChannelConfig_t generated2_channelConfig = {
.phyConfigBase = generated2,
.phyConfigDeltaSubtract = NULL,
.configs = generated2_channels,
.length = 1
};
const RAIL_ChannelConfig_t *channelConfigs[] = {
&generated0_channelConfig,
&generated1_channelConfig,
&generated2_channelConfig,
NULL
};
// ... in main code ...
// Create a unique RAIL handle for each unique channel configuration.
railHandle0 = RAIL_Init(&railCfg0, &RAILCb_RfReady0);
railHandle1 = RAIL_Init(&railCfg1, &RAILCb_RfReady1);
railHandle2 = RAIL_Init(&railCfg2, &RAILCb_RfReady2);
// Associate each channel configuration with its corresponding RAIL handle.
RAIL_ConfigChannels(railHandle0, channelConfigs[0]);
RAIL_ConfigChannels(railHandle1, channelConfigs[1]);
RAIL_ConfigChannels(railHandle2, channelConfigs[2]);
// Use a RAIL handle and channel to access the desired channel configuration entry.
RAIL_SetTxPowerDbm(railHandle1, 100); // set 10.0 dBm TX power
RAIL_StartRx(railHandle1, 0, &schedInfo); // RX using generated1_channels[2]
RAIL_SetTxPowerDbm(railHandle1, 0); // set 0 dBm TX power
RAIL_StartRx(railHandle1, 0, &schedInfo); // RX using generated1_channels[1]
RAIL_StartRx(railHandle2, 0, &schedInfo); // RX using generated2_channels[0]

Definition at line 1294 of file rail_types.h.

Field Documentation

const RAIL_ChannelConfigEntry_t* RAIL_ChannelConfig_t::configs

Pointer to an array of RAIL_ChannelConfigEntry_t entries.

Definition at line 1300 of file rail_types.h.

uint32_t RAIL_ChannelConfig_t::length

Number of RAIL_ChannelConfigEntry_t entries.

Definition at line 1303 of file rail_types.h.

const uint32_t* RAIL_ChannelConfig_t::phyConfigBase

Base radio configuration for the corresponding channel configuration entries.

Definition at line 1295 of file rail_types.h.

const uint32_t* RAIL_ChannelConfig_t::phyConfigDeltaSubtract

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

Definition at line 1297 of file rail_types.h.

uint32_t RAIL_ChannelConfig_t::signature

Signature for this structure.

Only used on modules.

Definition at line 1304 of file rail_types.h.


The documentation for this struct was generated from the following file:
  • common/rail_types.h