MAVRK Embedded Software 0.91
Software Libraries for the MAVRK motherboard and related components
Data Structures | Defines | Enumerations | Functions | Variables

cc_radio.h File Reference

#include "PC_Interface.h"

Go to the source code of this file.

Data Structures

struct  CC_Device_Radio_Status_Flags_type
struct  CC_Device_Radio_Status_Flags_2_type
struct  CC_Device_Status_Register_type
struct  Tx_FIFO_type
struct  Rx_FIFO_type
struct  Packet_Status_Register_type
struct  IO_Configuration_2_register_type
struct  IO_Configuration_1_register_type
struct  IO_Configuration_0_register_type
struct  CC112X_IO_Configuration_0_register_type
struct  CC112X_IO_Configuration_2_register_type
struct  CC112X_IO_Configuration_3_register_type
struct  FIFO_Threshold_register_type
struct  Packet_Automation_Control_1_register_type
struct  Packet_Automation_Control_0_register_type
struct  CC112X_Packet_Config_0_register_type
struct  CC112X_Packet_Config_1_register_type
struct  Main_Radio_Control_State_Machine_register_type
struct  CC112X_Modem_Config_1_register_type
struct  CC112X_Sync_Configuration_1_register_type
struct  CC112X_AGC_Configuration_1_register_type
struct  CC112X_Modem_Config_0_register_type
struct  CC112X_PA_Configuration_2_register_type
struct  CC112X_PA_Configuration_0_register_type
struct  CC112X_Soft_TX_Data_Configuration_register_type
struct  Frequency_Synthesizer_Control_1_type
struct  Frequency_Synthesizer_Control_0_type
struct  Modem_Configuration_4_type
struct  Modem_Configuration_3_type
struct  Modem_Configuration_2_type
struct  Modem_Configuration_1_type
struct  Modem_Configuration_0_type
struct  Modem_Deviation_Setting_type
struct  Main_Radio_Control_State_Machine_2_type
struct  Main_Radio_Control_State_Machine_1_type
struct  CC112X_Packet_Config_2_register_type
struct  Main_Radio_Control_State_Machine_0_type
struct  Frequency_Offset_Compensation_Configuration_type
struct  Bit_Synchronization_Configuration_type
struct  Automatic_Gain_Control_2_Register_type
struct  Automatic_Gain_Control_1_Register_type
struct  Automatic_Gain_Control_0_Register_type
struct  Wake_On_Radio_Control_Register_type
struct  Rx_Front_End_Configuration_Register_type
struct  Tx_Front_End_Configuration_Register_type
struct  Frequency_Synthesizer_Calibration_3_Register_type
struct  Frequency_Synthesizer_Calibration_2_Register_type
struct  Frequency_Synthesizer_Calibration_1_Register_type
struct  Frequency_Synthesizer_Calibration_0_Register_type
struct  RC_Oscillator_Configuration_1_Register_type
struct  RC_Oscillator_Configuration_0_Register_type
struct  LQI_CRC_Received_Packet_Status_type
struct  CC112X_Settling_Configuration_register_type
struct  CC112X_RF_End_Config_1_register_type
struct  CC112X_RF_End_Config_0_register_type
struct  CC112X_RSSI_0_register_type
struct  CC112X_FSCalibrate_Control_register_type
struct  CC112X_RSSI_1_register_type
struct  Test_0_type

Defines

#define NUMBER_OF_RETRIES   3
#define RSSI_OFFSET   72
#define CC112X_RSSI_OFFSET   102
#define RADIO_APPEND_NUM   2
#define MINIMUM_CHANNEL_NUMBER   4
#define MAXIMUM_CHANNEL_NUMBER   125
#define FS_TEST_DEFAULT   0x59
#define P_TEST_DEFAULT   0x7F
#define ENABLE_TEMP_SENSOR_AT_IDLE   0xBF
#define AGC_TEST_DEFAULT   0x3F
#define TEST_2_DEFAULT   0x88
#define TEST_2_IMPROVE_DATA_RATE_SENSITIVITY   0x81
#define TEST_1_DEFAULT   0x31
#define TEST_1_IMPROVE_DATA_RATE_SENSITIVITY   0x35

Enumerations

enum  Transmit_Status_type {
  TRANSMIT_SUCCESSFUL = 0, TRANSMIT_UNSUCCESSFUL = 10, ACK_RECEIVED = 2, ACK_NOT_RECEIVED = 3,
  ACK_NOT_RECEIVED_TRANSMIT_ONLY = 4, TRANSMIT_SUCCESSFUL = 0, TRANSMIT_UNSUCCESSFUL = 10, ACK_RECEIVED = 2,
  ACK_NOT_RECEIVED = 3, ACK_NOT_RECEIVED_TRANSMIT_ONLY = 4
}
enum  CC_Radio_Init_Status_type { CC_RADIO_INIT_SUCCESSFUL = 0, CC_RADIO_INIT_VERIFY_ERROR = 1, NO_CC_RADIO_FOUND = 10 }
enum  CC_Radio_Init_and_Set_Status_type {
  CC_RADIO_SET_SUCCESSFULL = 0, CC_RADIO_SET_VERIFY_ERROR = 1, CC_PACKET_SET_OVER_FIFO_SIZE = 2, CC_PA_POINTER_SET_OVER_TABLE_SIZE = 3,
  CC_CHANNEL_SPACING_BOUNDARY_ERROR = 4, CC_DESIRED_CHANNEL_OUT_OF_RANGE = 5, CC_RADIO_PARAMETER_OUT_OF_RANGE = 6, CC_RADIO_RUNT_PACKET_FOUND = 7,
  CC_RADIO_NO_ERRORS = 8, CC_RADIO_SET_FAILED = 9, CC_RADIO_CHANGE_CHANNEL_ERROR = -127
}
enum  CC_Radio_TX_FIFO_Status_type {
  CC_RADIO_TX_FIFO_SUCCESSFUL = 0, CC_RADIO_TX_BUFFER_NOT_EMPTY = 1, CC_RADIO_STRING_TRUNCATED = 2, CC_RADIO_TX_BUFFER_UNDERFLOW = 3,
  CC_RADIO_TX_FIFO_CONFIGURATION_ERROR = 4
}
enum  CC_Radio_RX_FIFO_Status_type {
  CC_RADIO_RX_FIFO_SUCCESSFUL = 0, CC_RADIO_RX_VARIABLE_PACKET_ERROR = 1, CC_RADIO_RX_PACKET_SIZE_MISMATCH = 2, CC_RADIO_RX_ADDRESS_MISMATCH = 3,
  CC_RADIO_RX_BROADCAST_ADDRESS_RX = 4, CC_RADIO_RX_DHCP_ADDRESS_RX = 5, CC_RADIO_RX_OWN_ADDRESS_RX = 6, CC_RADIO_RX_FIFO_OVERFLOW = 7,
  CC_RADIO_RX_NULL_PACKET = 8, CC_RADIO_RX_CRC_ERROR = 9
}
enum  CC_Radio_Diversity_type { USE_GDO_2_RF_SWITCH = 0, ANTENNA_DIVERSITY_LEFT = 65, ANTENNA_DIVERSITY_RIGHT = 64 }
enum  CC_Radio_API_type { CC_RADIO_PACKET_PROCESS_SUCCESS = 0, CC_RADIO_SLOT_ERROR = 1 }
enum  CC_RADIO_Acknowledge_Type { RADIO_ACK_RECEIVED = 1, RADIO_NAK_RECEIVED = 2 }
enum  CC_Radio_Data_Status_Type { NEW_DATA_PACKET_RECEIVED = 0x02, NO_NEW_DATA = 0x04 }
enum  Radio_Mode_Type { RADIO_IS_IDLE = 0, RADIO_IS_TRANSMITTING = 1, RADIO_IS_RECEIVING = 2, RADIO_IS_IN_RSSI_SCAN = 3 }
enum  Transceiver_Start_Mode_Type { TRANSCEIVER_IDLE = 0, TRANSCEIVER_LOCKED = 1 }
enum  Radio_Packet_Data_Type { RADIO_PACKET_READ = 0x80, RADIO_PACKET_WRITE = 0x00, RADIO_PACKET_READ_BURST = 0xC0, RADIO_PACKET_WRITE_BURST = 0x40 }
enum  Radio_Mode_Settings_Type { TX_NORMAL = 0x20, TX_RANDOM = 0x40, TX_UNMODULATED = 0x80, RX_NORMAL = 0x10 }
enum  Machine_State_Type {
  IDLE_STATE = 0, RX_STATE = 1, TX_STATE = 2, FAST_TX_STATE = 3,
  CALIBRATE = 4, PLL_SETTLING = 5, RX_FIFO_OVERFLOW = 6, TX_FIFO_UNDERFLOW = 7
}
enum  Main_Radio_Control_State_Machine_Status_Type {
  FSM_SLEEP = 0, FSM_IDLE = 1, FSM_XOFF = 2, FSM_VCO_ON_MAN_CAL = 3,
  FSM_REGULATOR_ON_MAN_CAL = 4, FSM_MANUAL_CAL = 5, FSM_VCO_ON_WAKE = 6, FSM_REGULATOR_ON_WAKE = 7,
  FSM_START_CAL = 8, FSM_BW_BOOST = 9, FSM_FREQ_SYNTH_LOCK = 10, FSM_ADC_ON = 11,
  FSM_END_CAL = 12, FSM_RECEIVE = 13, FSM_RECEIVE_END = 14, FSM_RECEIVE_RESET = 15,
  FSM_RECEIVE_FIFO_OVERFLOW = 17, FSM_TX_RX_SWITCH = 16, FSM_RX_TX_SWITCH = 21, FREQ_SYNTH_TRANSMIT_ON = 18,
  FSM_TRANSMIT = 19, FSM_TRANSMIT_END = 20, FSM_TRANSMIT_FIFO_OVERFLOW = 22
}
enum  Pin_Function_Type {
  RX_FIFO_THRESHOLD = 0, RX_FIFO_THRESHOLD_PACKET_COMPLETE = 1, TX_FIFO_THRESHOLD = 2, TX_FIFO_FULL = 3,
  RX_FIFO_OVERFLOW_ERROR = 4, TX_FIFO_UNDERFLOW_ERROR = 5, SYNC_WORD_SENT_RECEIVED = 6, CRC_OK_PACKET_RECEIVED = 7,
  PREAMBLE_QUALITY_REACHED = 8, SERIAL_CLK = 8, CLEAR_CHANNEL_ASSESSMENT = 9, SERIAL_DATA_RX_MODE = 9,
  PLL_LOCKED = 10, CC112X_PLL_LOCKED = 35, GENERAL_PURPOSE_LEVEL_INTERRUPT = 10, SERIAL_CLOCK_OUTPUT = 11,
  PREAMBLE_PROGRAMMED_QUALITY_REACHED = 11, SERIAL_DATA_OUTPUT = 12, PREAMBLE_QUALITY_VALID = 12, SERIAL_TRANSPARENT_DATA_OUT = 13,
  RSSI_VALID = 13, CARRIER_SENSED = 14, CRC_OK = 15, CARRIER_SENSE_VALID = 16,
  CARRIER_SENSE = 17, PACKET_RECEIVED_WITH_VALID_CRC = 19, MCU_WAKE_UP_SIGNAL_BY_MARC = 20, RX_HARD_DATA_0 = 22,
  RX_HARD_DATA_1 = 23, POWER_AMP_ENABLE = 27, LNA_ENABLE = 28, WAKE_ON_RADIO_EVENT_0 = 36,
  WAKE_ON_RADIO_EVENT_1 = 37, CHIP_READY = 41, XOSC_STABLE = 43, SERIAL_TX_DATA = 45,
  HI_Z = 46, PULLED_LOW = 47, CLOCK_OSCILLATOR = 48, CLOCK_OSCILLATOR_DIVIDED_BY_1_5 = 49,
  CLOCK_OSCILLATOR_DIVIDED_BY_2 = 50, CLOCK_OSCILLATOR_DIVIDED_BY_3 = 51, CLOCK_OSCILLATOR_DIVIDED_BY_4 = 52, CLOCK_OSCILLATOR_DIVIDED_BY_6 = 53,
  CLOCK_OSCILLATOR_DIVIDED_BY_8 = 54, CLOCK_OSCILLATOR_DIVIDED_BY_12 = 55, CLOCK_OSCILLATOR_DIVIDED_BY_16 = 56, CLOCK_OSCILLATOR_DIVIDED_BY_24 = 57,
  CLOCK_OSCILLATOR_DIVIDED_BY_32 = 58, CLOCK_OSCILLATOR_DIVIDED_BY_48 = 59, CLOCK_OSCILLATOR_DIVIDED_BY_64 = 60, CLOCK_OSCILLATOR_DIVIDED_BY_96 = 61,
  CLOCK_OSCILLATOR_DIVIDED_BY_128 = 62, CLOCK_OSCILLATOR_DIVIDED_BY_192 = 63
}
enum  Output_Polarity_Type { GDO_ACTIVE_HIGH = 0, GDO_ACTIVE_LOW = 1 }
enum  Drive_Pin_Type { HIGH_POWER = 1, LOW_POWER = 0 }
enum  FIFO_Threshold_Type {
  _61_BYTES_TX_4_BYTES_RX = 0, _57_BYTES_TX_8_BYTES_RX = 1, _53_BYTES_TX_12_BYTES_RX = 2, _49_BYTES_TX_16_BYTES_RX = 3,
  _45_BYTES_TX_20_BYTES_RX = 4, _41_BYTES_TX_24_BYTES_RX = 5, _37_BYTES_TX_28_BYTES_RX = 6, _33_BYTES_TX_32_BYTES_RX = 7,
  _29_BYTES_TX_36_BYTES_RX = 8, _25_BYTES_TX_40_BYTES_RX = 9, _21_BYTES_TX_44_BYTES_RX = 10, _17_BYTES_TX_48_BYTES_RX = 11,
  _13_BYTES_TX_52_BYTES_RX = 12, _9_BYTES_TX_56_BYTES_RX = 13, _5_BYTES_TX_60_BYTES_RX = 14, _1_BYTES_TX_64_BYTES_RX = 15
}
enum  Address_Check_On_RX_Packet_Type { NO_ADDRESS_CHECK = 0, ADDRESS_CHECK_NO_BROADCAST = 1, ADDRESS_CHECK_0x00_BROADCAST = 2, ADDRESS_CHECK_0x00_BROADCAST_0xFF_BROADCAST = 3 }
enum  PLL_Auto_Calibration { MANUALLY_CALIBRATE = 0, IDLE_TO_RX_OR_TX = 1, RX_OR_TX_TO_IDLE = 2, EVERY_FOURTH_RX_OR_TX_TO_IDLE = 3 }
enum  Packet_Length_Configuration_Type { FIXED_LENGTH = 0, VARIABLE_LENGTH = 1, INFINITE_LENGTH = 2 }
enum  AGC_Wait_Samples_type { AGC_WAIT_24_SAMPLES = 0, AGC_WAIT_32_SAMPLES = 1, AGC_WAIT_40_SAMPLES = 2, AGC_WAIT_48_SAMPLES = 3 }
enum  AGC_Window_Size_type {
  AGC_WINDOW_8_SAMPLES = 0, AGC_WINDOW_16_SAMPLES = 1, AGC_WINDOW_32_SAMPLES = 2, AGC_WINDOW_64_SAMPLES = 3,
  AGC_WINDOW_128_SAMPLES = 4, AGC_WINDOW_256_SAMPLES = 5
}
enum  AGC_Sync_Behaviour_type {
  NO_AGC_GAIN_FREEZE_AND_KEEP_UPDATE_RSSI = 0, FREEZE_AGC_GAIN_AND_KEEP_UPDATING_RSSI = 1, RSSI_FREEZE_AND_AGC_SLOW_MODE_ENABLED = 2, FREEZE_BOTH_AGC_GAIN_AND_RSSI = 3,
  NO_AGC_GAIN_FREEZE_AND_KEEP_UPDATING_RSSI = 4, NO_AGC_GAIN_OR_FREEZE_RSSI_AND_AGC_SLOW_MODE_ENABLED = 6
}
enum  RX_TX_Packet_Format_Type { NORMAL_MODE_USE_FIFOS_FOR_RX_TX = 0, LEGACY_SERIAL_SYNCHRONOUS_MODE = 1, TX_PN9_RANDOM_DATA = 2, ASYNCHRONOUS_TRANSPARENT_MODE = 3 }
enum  Sync_Word_Qualifier_Mode_Type {
  NO_PREAMBLE_SYNC = 0, _15_16_WORD_BITS_DETECTED = 1, _16_16_WORD_BITS_DETECTED = 2, _30_32_WORD_BITS_DETECTED = 3,
  NO_PREAMBLE_SYNC_CARRIER_DETECTED = 4, _15_16_WORD_BITS_CARRIER_DETECTED = 5, _16_16_WORD_BITS_CARRIER_DETECTED = 6, _30_32_WORD_BITS_CARRIER_DETECTED = 7
}
enum  Radio_Modulation_Format_Type { FSK_MODULATION = 0, GFSK_MODULATION = 1, OOK_MODULATION = 3, MSK_MODULATION = 7 }
enum  Preamble_Bytes_Transmitted_Type {
  _2_PREAMBLE_BYTES = 0, _3_PREAMBLE_BYTES = 1, _4_PREAMBLE_BYTES = 2, _6_PREAMBLE_BYTES = 3,
  _8_PREAMBLE_BYTES = 4, _12_PREAMBLE_BYTES = 5, _16_PREAMBLE_BYTES = 6, _24_PREAMBLE_BYTES = 7
}
enum  RX_Timeout_Type {
  EVENT_0_TIMES_3_6058_OR_18_0288 = 0, EVENT_0_TIMES_1_8029_OR_9_0144 = 1, EVENT_0_TIMES_0_9014_OR_4_5072 = 2, EVENT_0_TIMES_0_4507_OR_2_2536 = 3,
  EVENT_0_TIMES_0_2254_OR_1_1268 = 4, EVENT_0_TIMES_0_1127_OR_0_5634 = 5, EVENT_0_TIMES_0_0563_OR_0_2817 = 6, UNTIL_END_OF_PACKET = 7
}
enum  Packet_Handle_Config_Type { NORMAL_FIFO_MODE = 0, SYNCHRONOUS_SERIAL_MODE = 1, RANDOM_DATA_MODE = 2 }
enum  Clear_Channel_Authentication_Mode_Type {
  ALWAYS = 0, IF_RSSI_IS_BELOW_THRESHOLD = 1, UNLESS_CURRENTLY_RECEIVING_PACKET = 2, IF_RSSI_IS_BELOW_THRESHOLD_UNLESS_CURRENTLY_RECEIVING_PACKET = 3,
  IF_RSSI_IS_BELOW_THRESHOLD_AND_MEETS_ETSI_LBT_REQUIREMENTS = 4
}
enum  TX_RX_Mode_After_Packet_Transmitted_Or_Received_Type {
  MODE_RETURNS_TO_IDLE = 0, FS_TX_ON = 1, MODE_TX = 2, STAY_IN_TX = 2,
  MODE_RX = 3, STAY_IN_RX = 3
}
enum  CRC_Configuration_Type { CRC_DISABLED_FOR_TX_AND_RX = 0, CRC_CALCULATION_ON_TX_AND_CHECK_ON_RX_INIT_ONES = 1, CRC_CALCULATION_ON_TX_AND_CHECK_ON_RX_INIT_ZEROS = 2 }
enum  Auto_Calibrat_TX_RX_Idle_Type { NEVER = 0, WHEN_GOING_FROM_IDLE_TO_TX_RX = 1, WHEN_GOING_FROM_TX_RX_TO_IDLE = 2, EVERY_4TH_TIME_GOING_FROM_TX_RX_TO_IDLE = 3 }
enum  Power_On_Timeout_Type { APPROXIMATELY_2_3_US_AFTER_XOSC_START = 0, APPROXIMATELY_37_US_AFTER_XOSC_START = 1, APPROXIMATELY_150_US_AFTER_XOSC_START = 2, APPROXIMATELY_600_US_AFTER_XOSC_START = 3 }
enum  FOC_Loop_Gain_Before_Sync_Detect_Type { _K = 0, _2_K = 1, _3_K = 2, _4_K = 3 }
enum  FOC_Loop_Gain_After_Sync_Detect_Type { Same_As_FOC_Loop_Gain_Before_Sync_Detect = 0, Same_As_Clock_Recovery_Integral_Gain_Pre_Sync = 0, Same_As_Clock_Recovery_Proportaional_Gain_Pre_Sync = 0, K_Div_By_2 = 1 }
enum  FOC_Saturation_Point_Type { NO_FREQUENCY_OFFSET_COMPENSATION = 0, CHANNEL_BANDWIDTH_DIVIDED_BY_8 = 1, CHANNEL_BANDWIDTH_DIVIDED_BY_4 = 2, CHANNEL_BANDWIDTH_DIVIDED_BY_2 = 3 }
enum  Data_Rate_Offset_Saturation_Point_Type { NO_DATA_RATE_OFFSET_COMPENSATION = 0, PLUS_MINUS_3_125_PERCENT_DATA_RATE_OFFSET = 1, PLUS_MINUS_6_25_PERCENT_DATA_RATE_OFFSET = 2, PLUS_MINUS_12_5_PERCENT_DATA_RATE_OFFSET = 3 }
enum  Maximum_Allowable_DVGA_Gain_Type { ALL_GAIN_SETTINGS_CAN_BE_USED = 0, HIGHEST_GAIN_SETTING_CAN_NOT_BE_USED = 1, _2_HIGHEST_GAIN_SETTINGS_CAN_NOT_BE_USED = 2, _3_HIGHEST_GAIN_SETTINGS_CAN_NOT_BE_USED = 3 }
enum  Maximum_Possible_LNA_Gain_Type {
  MAXIMUM_LNA_PLUS_LNA_2_GAIN = 0, APPROX_2_6_DB_BELOW_MAXIMUM_GAIN = 1, APPROX_6_1_DB_BELOW_MAXIMUM_GAIN = 2, APPROX_7_4_DB_BELOW_MAXIMUM_GAIN = 3,
  APPROX_9_2_DB_BELOW_MAXIMUM_GAIN = 4, APPROX_11_5_DB_BELOW_MAXIMUM_GAIN = 5, APPROX_14_6_DB_BELOW_MAXIMUM_GAIN = 6, APPROX_17_1_DB_BELOW_MAXIMUM_GAIN = 7
}
enum  Averaged_Amplitude_From_The_Digital_Filter_Type {
  _24_DB = 0, _27_DB = 1, _30_DB = 2, _33_DB = 3,
  _36_DB = 4, _38_DB = 5, _40_DB = 6, _42_DB = 7
}
enum  Max_RSSI_Threshold_For_Asserting_Carrier_Sense_Type {
  ABSOLUTE_CARRIER_SENSE_THRESHOLD_DISABLED = 8, _7_DB_BELOW_MAGNITUDE_TARGET = 9, _6_DB_BELOW_MAGNITUDE_TARGET = 10, _5_DB_BELOW_MAGNITUDE_TARGET = 11,
  _4_DB_BELOW_MAGNITUDE_TARGET = 12, _3_DB_BELOW_MAGNITUDE_TARGET = 13, _2_DB_BELOW_MAGNITUDE_TARGET = 14, _1_DB_BELOW_MAGNITUDE_TARGET = 15,
  AT_MAGNITUDE_TARGET = 0, _1_DB_ABOVE_MAGNITUDE_TARGET = 1, _2_DB_ABOVE_MAGNITUDE_TARGET = 2, _3_DB_ABOVE_MAGNITUDE_TARGET = 3,
  _4_DB_ABOVE_MAGNITUDE_TARGET = 4, _5_DB_ABOVE_MAGNITUDE_TARGET = 5, _6_DB_ABOVE_MAGNITUDE_TARGET = 6, _7_DB_ABOVE_MAGNITUDE_TARGET = 7
}
enum  Relative_Carrier_Sense_Threshold_Type { RELATIVE_CARRIER_SENSE_THRESHOLD_DISABLED = 0, _6_DB_INCREASE_IN_RSSI_VALUE = 1, _10_DB_INCREASE_IN_RSSI_VALUE = 2, _14_DB_INCREASE_IN_RSSI_VALUE = 3 }
enum  LNA_Gain_Priority_Type { LNA_2_GAIN_DECREASED_FIRST = 0, LNA_GAIN_DECREASED_FIRST = 1 }
enum  Magnitude_Deviation_Hysteresis_Type { NO_HYSTERESIS_SMALL_SYMMETRIC_DEAD_ZONE_HIGH_GAIN = 0, LOW_HYSTERESIS_SMALL_SYMMETRIC_DEAD_ZONE_MEDIUM_GAIN = 1, MEDIUM_HYSTERESIS_SMALL_SYMMETRIC_DEAD_ZONE_MEDIUM_GAIN = 2, LARGE_HYSTERESIS_SMALL_SYMMETRIC_DEAD_ZONE_LOW_GAIN = 3 }
enum  Channel_Filter_Samples_Until_AGC_Accumulation_Type { _8_SAMPLES = 0, _16_SAMPLES = 1, _24_SAMPLES = 2, _32_SAMPLES = 3 }
enum  AGC_Gain_Freeze_Type { NORMAL_OPERATION = 0, GAIN_SETTING_FROZEN_ON_SYNC_WORD = 1, ANALOG_GAIN_FROZEN_MANUALLY_DIGITAL_GAIN_AUTOMATICALLY_ADJUSTED = 2, MANUALLY_FREEZE_ANALOG_AND_DIGITAL_GAIN = 3 }
enum  Averaging_Filter_Length_Type { AVERAGING_LENGTH_IS_8_SAMPLES = 0, AVERAGING_LENGTH_IS_16_SAMPLES = 1, AVERAGING_LENGTH_IS_32_SAMPLES = 2, AVERAGING_LENGTH_IS_64_SAMPLES = 3 }
enum  Event_1_Timeout_After_Event_0_Type {
  _4_CLOCK_PERIODS = 0, _6_CLOCK_PERIODS = 1, _8_CLOCK_PERIODS = 2, _12_CLOCK_PERIODS = 3,
  _16_CLOCK_PERIODS = 4, _24_CLOCK_PERIODS = 5, _32_CLOCK_PERIODS = 6, _48_CLOCK_PERIODS = 7
}
enum  Event_0_Resolution_Type { _1_PERIOD = 0, _32_PERIODS = 1 }
enum  Registers_Set_By_RF_Studio {
  IOCFG2_GDO_2_OUTPUT_PIN_CONFIGURATION = 0x00, IOCFG0D_GDO_0_OUTPUT_PIN_CONFIGURATION = 0x02, PKTLEN_PACKET_LENGTH = 0x06, PKTCTRL_1_PACKET_AUTOMATION_CONTROL = 0x07,
  PKTCTRL_0_PACKET_AUTOMATION_CONTROL = 0x08, ADDR_DEVICE_ADDRESS = 0x09, CHANNR_CHANNEL_NUMBER = 0x0A, FSCTRL_1_FREQUENCY_SYNTHESIZER_CONTROL = 0x0B,
  FSCTRL_0_FREQUENCY_SYNTHESIZER_CONTROL = 0x0C, FREQ_2_FREQUENCY_CONTROL_WORD_HIGH_BYTE = 0x0D, FREQ_1_FREQUENCY_CONTROL_WORD_MIDDLE_BYTE = 0x0E, FREQ_0_FREQUENCY_CONTROL_WORD_LOW_BYTE = 0x0F,
  MDMCFG_4_MODEM_CONFIGURATION = 0x10, MDMCFG_3_MODEM_CONFIGURATION = 0x11, MDMCFG_2_MODEM_CONFIGURATION = 0x12, MDMCFG_1_MODEM_CONFIGURATION = 0x13,
  MDMCFG_0_MODEM_CONFIGURATION = 0x14, DEVIATN_MODEM_DEVIATION_SETTING = 0x15, MCSM_0_MAIN_RADIO_CONTROL_STATE_MACHINE_CONFIGURATION = 0x18, FOCCFG_FREQUENCY_OFFSET_COMPENSATION_CONFIGURATION = 0x19,
  BSCFG_IT_SYNCHRONIZATION_CONFIGURATION = 0x1A, AGCCTRL_2_AGC_CONTROL = 0x1B, AGCCTRL_1_AGC_CONTROL = 0x1C, AGCCTRL_0_AGC_CONTROL = 0x1D,
  FREND_1_FRONT_END_RX_CONFIGURATION = 0x21, FREND_0_FRONT_END_RX_CONFIGURATION = 0x22, FSCAL_3_FREQUENCY_SYNTHESIZER_CALIBRATION = 0x23, FSCAL_2_FREQUENCY_SYNTHESIZER_CALIBRATION = 0x24,
  FSCAL_1_FREQUENCY_SYNTHESIZER_CALIBRATION = 0x25, FSCAL_0_FREQUENCY_SYNTHESIZER_CALIBRATION = 0x26, FSTEST_FREQUENCY_SYNTHESIZER_CALIBRATION = 0x29, TEST_2_VARIOUS_TEST_SETTINGS = 0x2C,
  TEST_1_VARIOUS_TEST_SETTINGS = 0x2D, TEST_0_VARIOUS_TEST_SETTINGS = 0x2E
}
enum  Other_Registers_Not_Set_By_RF_Studio {
  IOCFG1_GDO_1_OUTPUT_PIN_CONFIGURATION = 0x01, FIFO_THR_RX_AND_TX_THRESHOLDS = 0x03, SYNC_1_SYNC_WORD_HIGH_BYTE = 0x04, SYNC_0_SYNC_WORD_LOW_BYTE = 0x05,
  MCSM_2_MAIN_RADIO_CONTROL_STATE_MACHINE_CONFIGURATION = 0x16, MCSM_1_MAIN_RADIO_CONTROL_STATE_MACHINE_CONFIGURATION = 0x17, WOREVT_1_WAKE_ON_RADIO_EVENT_0_TIMEOUT_HIGH_BYTE = 0x1E, WOREVT_0_WAKE_ON_RADIO_EVENT_0_TIMEOUT_LOW_BYTE = 0x1F,
  WORCTRL_0_WAKE_ON_RADIO_CONTROL = 0x20, RC_CNTRL_1_RC_OSCILLATOR_CONFIGURATION = 0x27, RC_CNTRL_0_RC_OSCILLATOR_CONFIGURATION = 0x28, AGCTEST_AGC_TEST = 0x2B,
  PRODUCTION_TEST = 0x2A
}
enum  CC112X_Radio_Registers {
  CC112X_PARTNUM_CHIP_ID = 0x2F8F, CC112X_VERSION_CHIP_ID = 0x2F90, CC112X_IOCFG0D_GDO_0_OUTPUT_PIN_CONFIGURATION = 0x0003, CC112X_IOCFG2D_GDO_2_OUTPUT_PIN_CONFIGURATION = 0x0001,
  CC112X_IOCFG3D_GDO_3_OUTPUT_PIN_CONFIGURATION = 0x0000, CC112X_PACKET_CONFIGURATION_0 = 0x0028, CC112X_PACKET_CONFIGURATION_1 = 0x0027, CC112X_PACKET_CONFIGURATION_2 = 0x0026,
  CC112X_PA_CONFIGURATION_0 = 0x002D, CC112X_PA_CONFIGURATION_2 = 0x002B, CC112X_MODEM_CONFIGURATION_0 = 0x0013, CC112X_SOFT_TX_DATA_CONFIGURATION = 0x2F05,
  CC112X_SYNC_CONFIGURATION_1 = 0x0008, CC112X_AGC_CONFIGURATION_1 = 0x001C, CC112X_DEVICE_ADDRESS = 0x001F, CC112X_SETTLING_CONFIGURATION = 0x0020,
  CC112X_RF_END_CONFIGURATION_0 = 0x002A, CC112X_RF_END_CONFIGURATION_1 = 0x0029, CC112X_MODEM_CONFIGURATION_1 = 0x0012, CC112X_PACKET_LENGTH = 0x002E,
  CC112X_RSSI_VALUE = 0x2F71, CC112X_CRC_LINK_QUALITY = 0x2F74, CC112X_NUM_TXBYTES = 0x2FD6, CC112X_NUM_RXBYTES = 0x2FD7,
  CC112X_SET_FREQUENCY_BYTE_0 = 0x2F0E, CC112X_SET_FREQUENCY_BYTE_1 = 0x2F0D, CC112X_SET_FREQUENCY_BYTE_2 = 0x2F0C, CC112X_FSCALIBRATE_CONTROL = 0x2F8D
}
enum  Burst_Read_Status_Registers {
  PARTNUM_CHIP_ID = 0x30, VERSION_CHIP_ID = 0x31, FREQEST_FREQUENCY_OFFSET_ESTIMATOR = 0x32, LQI_LINK_QUALITY_ESTIMATOR = 0x33,
  RSSI_RECEIVED_SIGNAL_STRENGTH_INDICATOR = 0x34, MARC_STATE_MAIN_RADIO_CONTROL_STATE_MACHINE_STATUS = 0x35, WORTIME_1_WAKE_ON_RADIO_TIMER_HIGH_BYTE = 0x36, WORTIME_0_WAKE_ON_RADIO_TIMER_LOW_BYTE = 0x37,
  PKTSTATUS_GPIO_AND_PACKET_STATUS_REGISTER = 0x38, VCO_VC_DAC_CURRENT_CALIBRATION_FROM_PLL_CALIBRATION_MODULE = 0x39, TX_BYTES_UNDERFLOW_AND_NUMBER_OF_BYTES_REGISTER = 0x3A, RX_BYTES_OVERFLOW_AND_NUMBER_OF_BYTES_REGISTER = 0x3B,
  RCCTRL_1_STATUS_LAST_RC_OSCILLATOR_CALIBRATION_RESULT = 0x3C, RCCTRL_0_STATUS_LAST_RC_OSCILLATOR_CALIBRATION_RESULT = 0x3D
}
enum  Command_Strobe_Registers {
  SRES_SOFTWARE_RESET = 0x30, SFS_TX_ON_ENABLE_AND_CALIBRATE_FREQUENCY_SYNTHESIZER = 0x31, SX_OFF_TURN_OFF_CRYSTAL_OSCILLATOR = 0x32, SCAL_CALIBRATE_FREQUENCY_SYNTHESIZER_AND_TURN_IT_OFF = 0x33,
  SRX_ENABLE_RX = 0x34, STX_ENABLE_TX = 0x35, SIDLE_EXIT_RX_TX_TURN_OFF_FREQUENCY_SYNTHESIZER = 0x36, SIDLE_EXIT_WAKE_ON_RADIO_MODE = 0x37,
  SWOR_START_WAKE_ON_RADIO_RX_POLLING_SEQUENCE = 0x38, SPWD_ENTER_POWER_DOWN_MODE = 0x39, SFRX_FLUSH_RX_FIFO = 0x3A, SFTX_FLUSH_TX_FIFO = 0x3B,
  SWORRST_RESET_REAL_TIME_CLOCK = 0x3C, SNOP_SPI_NO_OPERATION_USED_TO_GET_CHIP_STATUS_BYTE = 0x3D
}
enum  Multi_Byte_Registers { PA_TABLE_POWER_AMP_TABLE = 0x3E, TX_FIFO_WRITE = 0x3F, RX_FIFO_READ = 0x3F }
enum  PATABLE_Optimum_Value_Type {
  CC2500_2_4_GHZ_MINUS_55DBM_OR_LESS_AT_8_4_MA = 0x00, CC2500_2_4_GHZ_MINUS_30DBM_AT_9_9_MA = 0x50, CC2500_2_4_GHZ_MINUS_28DBM_AT_9_7_MA = 0x44, CC2500_2_4_GHZ_MINUS_26DBM_AT_10_2_MA = 0xC0,
  CC2500_2_4_GHZ_MINUS_24DBM_AT_10_1_MA = 0x84, CC2500_2_4_GHZ_MINUS_22DBM_AT_10_0_MA = 0x81, CC2500_2_4_GHZ_MINUS_20DBM_AT_10_1_MA = 0x46, CC2500_2_4_GHZ_MINUS_18DBM_AT_11_7_MA = 0x93,
  CC2500_2_4_GHZ_MINUS_16DBM_AT_10_8_MA = 0x55, CC2500_2_4_GHZ_MINUS_14DBM_AT_12_2_MA = 0x8D, CC2500_2_4_GHZ_MINUS_12DBM_AT_11_1_MA = 0xC6, CC2500_2_4_GHZ_MINUS_10DBM_AT_12_2_MA = 0x97,
  CC2500_2_4_GHZ_MINUS_8DBM_AT_14_1_MA = 0x6E, CC2500_2_4_GHZ_MINUS_6DBM_AT_15_0_MA = 0x7F, CC2500_2_4_GHZ_MINUS_4DBM_AT_16_2_MA = 0xA9, CC2500_2_4_GHZ_MINUS_2DBM_AT_17_7_MA = 0xBB,
  CC2500_2_4_GHz_0DBM_AT_21_2_MA = 0xFE, CC2500_2_4_GHZ_PLUS_1DBM_AT_21_5_MA = 0xFF, CC2550_2_4_GHZ_MINUS_12DBM_AT_11_2_MA = 0xC6, CC2550_2_4_GHZ_MINUS_6DBM_AT_14_7_MA = 0x7F,
  CC2550_2_4_GHZ_0DBM_AT_19_4_MA = 0xEE, CC2550_2_4_GHZ_1DBM_AT_21_3_MA = 0xFF, CC1100_315_MHZ_MINUS_30DBM_AT_10_6_MA = 0x04, CC1100_315_MHZ_MINUS_20DBM_AT_11_1_MA = 0x17,
  CC1100_315_MHZ_MINUS_15DBM_AT_11_8_MA = 0x1D, CC1100_315_MHZ_MINUS_10DBM_AT_13_0_MA = 0x26, CC1100_315_MHZ_MINUS_5DBM_AT_12_9_MA = 0x57, CC1100_315_MHZ_0DBM_AT_14_8_MA = 0x60,
  CC1100_315_MHZ_PLUS_5DBM_AT_18_1_MA = 0x85, CC1100_315_MHZ_PLUS_7DBM_AT_22_1_MA = 0xC2, CC1100_315_MHZ_PLUS_10DBM_AT_27_1_MA = 0xCB, CC1100_433_MHZ_MINUS_30DBM_AT_11_5_MA = 0x04,
  CC1100_433_MHZ_MINUS_20DBM_AT_12_1_MA = 0x17, CC1100_433_MHZ_MINUS_15DBM_AT_12_7_MA = 0x1C, CC1100_433_MHZ_MINUS_10DBM_AT_14_0_MA = 0x26, CC1100_433_MHZ_MINUS_5DBM_AT_13_7_MA = 0x57,
  CC1100_433_MHZ_0DBM_AT_15_6_MA = 0x60, CC1100_433_MHZ_PLUS_5DBM_AT_19_1_MA = 0x85, CC1100_433_MHZ_PLUS_7DBM_AT_24_2_MA = 0xC0, CC1100_433_MHZ_PLUS_10DBM_AT_29_2_MA = 0xC8,
  CC1100_915_MHZ_MINUS_30DBM_AT_11_5_MA = 0x11, CC1100_915_MHZ_MINUS_20DBM_AT_12_1_MA = 0x0D, CC1100_915_MHZ_MINUS_15DBM_AT_12_7_MA = 0x1C, CC1100_915_MHZ_MINUS_10DBM_AT_14_0_MA = 0x26,
  CC1100_915_MHZ_MINUS_5DBM_AT_13_7_MA = 0x57, CC1100_915_MHZ_0DBM_AT_15_6_MA = 0x83, CC1100_915_MHZ_PLUS_5DBM_AT_19_1_MA = 0x8E, CC1100_915_MHZ_PLUS_7DBM_AT_24_2_MA = 0xC0,
  CC1100_915_MHZ_PLUS_10DBM_AT_29_2_MA = 0xC9, CC1101_915_MHZ_MINUS_30DBM_AT_11_5_MA = 0x03, CC1101_915_MHZ_MINUS_20DBM_AT_12_1_MA = 0x0F, CC1101_915_MHZ_MINUS_15DBM_AT_12_7_MA = 0x1E,
  CC1101_915_MHZ_MINUS_10DBM_AT_14_0_MA = 0x27, CC1101_915_MHZ_MINUS_5DBM_AT_13_7_MA = 0x67, CC1101_915_MHZ_0DBM_AT_15_6_MA = 0x50, CC1101_915_MHZ_PLUS_5DBM_AT_19_1_MA = 0x81,
  CC1101_915_MHZ_PLUS_7DBM_AT_24_2_MA = 0xCB, CC1101_915_MHZ_PLUS_10DBM_AT_29_2_MA = 0xC2, CC430F5137_915_MHZ_PLUS_12DBM_AT_34_8_MA = 0xC0, CC430F5137_915_MHZ_PLUS_10DBM_AT_32_1_MA = 0xC3,
  CC430F5137_915_MHZ_PLUS_8_8DBM = 0xC6, CC430F5137_915_MHZ_0DBM_AT_17_6_MA = 0x8D, CC430F5137_915_MHZ_MINUS_6DBM_AT_17_6_MA = 0x2D, CC430F5137_915_MHZ_MINUS_12DBM = 0x25,
  CC430F5137_915_MHZ_MINUS_30DBM = 0x03
}
enum  Radio_Type { RECEIVING_RADIO = 0, TRANSMITTING_RADIO = 1, TRANSCEIVING_RADIO = 2 }
enum  Radio_Error_Trap_Sub_type { ERROR_RADIO_COMMAND_NOT_SUPPORTED = 30, INVALID_RADIO_CONFIGURATION = 31 }
enum  Radio_Part_Number_type { CC1120_PART_NUMBER = 0x48, CC2500_PART_NUMBER = 0x80, CC2550_PART_NUMBER = 0x82, CC1100_PART_NUMBER = 0x00 }
enum  Radio_Version_Number_type {
  CC1120_VERSION_NUMBER = 0x21, CC2500_VERSION_NUMBER = 0x03, CC2550_VERSION_NUMBER = 0x02, CC1100_VERSION_NUMBER = 0x03,
  CC1101_VERSION_NUMBER = 0x04, CC430_VERSION_NUMBER = 0x06
}

Functions

unsigned char mvk_Init_CC_Radio (unsigned char device_slot, volatile CC_Device_Radio_Status_Flags_type *CC_Device_Radio_Status_Flags)
 Perform a search of the part number and revision number of the device in the RF slot followed by an initialization of the registers in the device.
void mvk_Init_CC_Device_Via_Constant_Table (unsigned char device_slot, unsigned char *constant_pointer, unsigned char table_size)
 Perform a Address/Value programming of the TI CC Radio's with a constants table generated by Smart RF Studio.
void mvk_Init_CC_Device_Via_Constant_Table_Extended (unsigned char device_slot, unsigned int *constant_pointer, unsigned int table_size)
 Perform a Address/Value programming of the TI CC Radio's with a constants table generated by Smart RF Studio This function can handle extended register assignment (present in radio devices such as CC1120).
unsigned char mvk_Verify_CC_Device_Registers_Extended (unsigned char device_slot, unsigned int *constant_pointer, unsigned int table_size)
 Perform a read comparison in Address/Value format programmed by mvk_Init_CC_Radio.
unsigned char mvk_Verify_CC_Device_Registers (unsigned char device_slot, unsigned char *constant_pointer, unsigned char table_size)
 Perform a read comparison in Address/Value format programmed by mvk_Init_CC_Radio.
unsigned char mvk_Set_PA_Table_Multiple_Values (unsigned char device_slot, unsigned char *power_number)
 This updates the entire PA Table with a single value. Mainly used for the initialization of the entire table with a max or min value of the application.
void mvk_Init_MAVRK_RF_Device_Slot_for_CC_Radios (unsigned char device_slot)
unsigned char mvk_POR_CC_Device (unsigned char device_slot)
 Forces a reset to the indicated CC2500 device.
void mvk_Reset_Radio (unsigned char device_slot)
 Performs a software reset on the radio.
void mvk_Reset_Radio_Timeout (unsigned char device_slot)
 Performs a software reset on the radio.
void mvk_Set_GDO_Function_Flags (unsigned char device_slot, unsigned char function)
 This routine sets the flags used by the Pin ISRs to signal what function the interrupt is signalling.
unsigned char mvk_Init_GDO_0 (unsigned char device_slot, unsigned char function)
 Initializes GDO_0 on the indicated CC2500 device.
unsigned char mvk_Set_GDO_0_Function (unsigned char device_slot, unsigned char function)
 Configures the function for GD0_0 on the indicated Radio device.
void mvk_Enable_GDO_0 (unsigned char device_slot)
 Enables the GD0_0 function on the indicated CC2500 device.
void mvk_Reset_GDO_0_Interrupt_Edge (unsigned char device_slot)
 Resets the pin edge interrupt used by the GD0_0 function on the indicated CC2500 device.
void mvk_Disable_GDO_0 (unsigned char device_slot)
 Disables the GD0_0 function on the indicated CC2500 device.
void mvk_Save_GDO_0_Function (unsigned char device_slot)
 Saves the current function of the GDO_0 interrupt to be restored later.
unsigned char mvk_Restore_GDO_0_Function (unsigned char device_slot)
 Restores the previously saved function of the GDO_0 interrupt to be restored later.
unsigned char mvk_Init_GDO_2 (unsigned char device_slot, unsigned char function)
 Initializes GD0_2 on the indicated CC2500 device.
unsigned char mvk_Set_GDO_2_Function (unsigned char device_slot, unsigned char function)
 Configures the function for GD0_2 on the indicated CC2500 device.
unsigned char mvk_check_GDO_2 (unsigned char device_slot)
 Enables the GD0_2 function on the indicated CC430F5137 device.
void mvk_Save_GDO_2_Function (unsigned char device_slot)
 Saves the current function of the GDO_2 interrupt to be restored later.
unsigned char mvk_Restore_GDO_2_Function (unsigned char device_slot)
 Restores the previously saved function of the GDO_2 interrupt to be restored later.
void mvk_Sync_Word_Rx_Tx_GDO_Function (unsigned char pin_level, unsigned char device_slot, volatile CC_Device_Radio_Status_Flags_type *CC_Device_Radio_Status_Flags)
 CC Device Sync Word Rx/TX Routine.
void mvk_Sync_Word_High ()
 Starts the frequency hopping timer if gated by a open request.
void mvk_Init_CC_SPI_CS_IO (unsigned char device_slot)
 Initializes the GPIO and Chip Select pins for the ChipCon RF slots on the MAVRK boards.
unsigned char mvk_Process_Radio_Packet (unsigned char device_slot, unsigned char pin_level)
 Used by the user_ISR to process the incomeing packet.
void mvk_Initialize_Transmit_Radio (unsigned char device_slot)
 Routine used to initialize the CC radio in a transmit mode.
void mvk_Initialize_Receive_Radio (unsigned char device_slot)
 Routine used to initialize the CC radio in a receive mode.
void mvk_Initialize_Transceiver_Radio (unsigned char device_slot)
 Routine used to initialize the CC radio in a transmit and receive mode.
void mvk_Clear_Bad_Receive_Packet (void)
 Used to clear a bad or runt packet.
unsigned char mvk_Set_Diversity_Antenna (unsigned char device_slot, unsigned char antenna)
 Sets the Diversity Antenna.
void mvk_Toggle_Transmit_Diversity_Antenna (void)
 Switches the Diversity Antenna.
void mvk_Toggle_Receive_Diversity_Antenna (void)
 Switches the Diversity Antenna.
unsigned char mvk_Check_for_Packet_Errors (void)
 Checks for a Runt Packet Error. If present, the routine handles the error by clearing the FIFO and resetting the radio. Runt Packet occurs if the radio is receiving and the full payload hasn't arrived when the payload timer expires.
unsigned char mvk_Wait_Clear_To_Transmit ()
 Waits until it is possible to transmit using the radio.
void mvk_Read_Status (unsigned char device_slot)
 Read the status of the TI CC radio. Writing the Status gives info on the Tx Buffer. Reading the Status gives info on the Rx Buffer.
void mvk_Write_Status (unsigned char device_slot)
 Read the status of the TI CC radio. Writing the Status gives info on the Tx Buffer. Reading the Status gives info on the Rx Buffer.
unsigned char mvk_Read_Rx_FIFO_Status (unsigned char device_slot)
 Read the levels of the Transmit/Receive Buffers.
unsigned char mvk_Read_Tx_FIFO_Status (unsigned char device_slot)
 Read the levels of the Transmit/Receive Buffers.
unsigned char mvk_Read_Version_and_Part_Number_CC_Radio (unsigned char device_slot)
 Reads the version and part number of the TI Chipcon radio. Used in the discovery process of the RF Slot.
void mvk_Read_MARC_State (unsigned char device_slot)
 Reads the MARC state of the TI CC Radio.
void mvk_Read_Packet_Status (unsigned char device_slot)
 Reads the Packet state of the TI CC Radio.
void mvk_Read_Wake_On_Radio_Time (unsigned char device_slot)
 Reads the Time on the Wake on Radio Timer.
void mvk_Read_Frequency_Offset (unsigned char device_slot)
 Reads the Frequency Offset Register on the TI CC Radio.
void mvk_Read_RSSI (unsigned char device_slot)
 Reads the Received Signal Strength Register on the TI CC Radio.
void mvk_Read_Link_Quality (unsigned char device_slot)
 Reads the Link Quality Register on the TI CC Radio.
void mvk_Read_Current_PLL_Setting (unsigned char device_slot)
 Reads the PLL Register on the TI CC Radio.
void mvk_Read_RC_Oscillator_Calibration_Result (unsigned char device_slot)
 Reads the PLL Register on the TI CC Radio.
void mvk_Read_FSCAL1 (unsigned char device_slot)
void mvk_Read_PTEST (unsigned char device_slot)
 Reads the PLL Register on the TI CC Radio.
unsigned char mvk_Read_Receive_FIFO (unsigned char device_slot, char *Rx_Pointer, volatile CC_Device_Radio_Status_Flags_type *CC_Device_Radio_Status_Flags)
 Perform a Read operation from the Receive FIFO on the TI CC Radios.
unsigned char mvk_Write_To_Transmit_FIFO (unsigned char device_slot, char *string, unsigned char num_write_bytes, unsigned char slave_address, volatile CC_Device_Radio_Status_Flags_type *CC_Device_Radio_Status_Flags)
 Perform a write operation to the Transmit FIFO on the TI CC Radios.
void mvk_Flush_Tx_Fifo (unsigned char device_slot)
 Perform a Flush of the Tx FIFO.
void mvk_Flush_Rx_Fifo (unsigned char device_slot)
 Perform a Flush of the Rx FIFO.
unsigned char mvk_Set_Packet_Length (unsigned char device_slot, unsigned char packet_size)
 Sets the Packet Length Register on TI CC Radio as well as setting the Packet Mode to Fixed. Advantages: Saves one byte in the payload. Disadvantages: Always have to seen a full packet. Use case: Streaming applications.
unsigned char mvk_Set_Variable_Length (unsigned char device_slot)
 Sets the payload length to variable. Advantages: Do not have to Pad the TX data saving power and packet errors. Disadvantages: Lose a byte of the payload. Use case: Most general applications with small payloads.
unsigned char mvk_Enable_Address_Check (unsigned char device_slot, unsigned char mode)
 Enable an Address Byte to be used to filter the payload to data intended for the node Advantages: Radio maintains Rx Mode unless packet is intended for the device which requires less interaction with the host processor. Disadvantages: Uses 1 payload Byte. Use case: Most applications with small payloads and small STAR or point to point networks.
unsigned char mvk_Set_Device_Slave_Address (unsigned char device_slot, unsigned char address)
 Set's this devices address for use in Address checking by mvk_Enable_Address_Check.
unsigned char mvk_Disable_Address_Check (unsigned char device_slot)
 Disables the Address Byte saving a Byte Advantages: Saves 1 Byte in the payload Disadvantages: Radio is more active in receive mode forcing fast inspection of the packet (so that it can be returned to the RX state) Use case: Streaming applications. Applications that are monitoring network packet activity.
unsigned char mvk_Enable_Append_Status (unsigned char device_slot)
 Enables the Append Status Register allowing a snapshot of the received packets RSSI and LST to be incapsulated in the packet Advantages: Quickly able to assess intermittent nodes with packet errors without having to continuously monitoring the packet. Disadvantages: Uses two bytes in the Payload. Use case: Most small payload applications. Radio Diversity applications.
unsigned char mvk_Disable_Append_Status (unsigned char device_slot)
 Disables the Append Status Registers Advantages: Saves 2 Byte in the payload. Disadvantages: Continuous monitoring of the RSSI and LQI registers will need to be done on each packet. Use case: Streaming applications. Antenna Diversity Applications.
unsigned char mvk_Set_PA_Table_Single_Value (unsigned char device_slot, unsigned char power_number)
 This updates the entire PA Table with a single value. Mainly used for the initialization of the entire table with a max or min value of the application.
unsigned char mvk_Set_PA_Output_Level (unsigned char device_slot, unsigned char power_table_pointer)
 This function points to the 8 positions on the PA Table. Commonly used to scale the output power of the radio to save power and to control near radio interference.
unsigned char mvk_Set_PA_Table (unsigned char device_slot, unsigned char *power_table)
 This function points to the 8 positions on the PA Table. Commonly used to scale the output power of the radio to save power and to control near radio interference.
unsigned char mvk_Change_Channel (unsigned char channel_number, unsigned char device_slot, volatile CC_Device_Radio_Status_Flags_type *CC_Device_Radio_Status_Flags)
 This function changes the channel (carrier frequency) the Radio uses to transmit and receive Commonly used to avoid collisions or channel frequency with high noise levels. The initial channel is set by Smart RF studio in init_CC_Device The radio is set to IDLE mode after the end of this function.
unsigned char mvk_Set_Mode_After_TX_RX_to_IDLE (unsigned char device_slot)
 This function sets the Radio to go into IDLE mode after a successful Transmit or Receive.
unsigned char mvk_Set_Mode_After_Tx_Complete (unsigned char device_slot, unsigned char mode)
 This function defines what mode the radio goes into after a packet is transmitted.
unsigned char mvk_Set_Mode_After_Rx_Complete (unsigned char device_slot, unsigned char mode)
 This function defines what mode the radio goes into after a packet is received.
unsigned char mvk_Check_PLL_Lock (unsigned char device_slot)
 Checks whether the radio has PLL lock.
unsigned char mvk_Check_Radio_Calibration_Complete (unsigned char device_slot)
 Checks whether the radio has completed calibration.
void mvk_Set_Default_Radio_Settings (unsigned char device_slot)
 Sets some default radio settings.
void mvk_Set_Radio_Power_Level (unsigned char device_slot, signed char power_level)
 Sets the radio power level.
void mvk_Idle_Radio (unsigned char device_slot, volatile CC_Device_Radio_Status_Flags_type *CC_Device_Radio_Status_Flags)
 Puts the radio in IDLE mode, the device is neither transmitting or receiving Advantages: Saves power compared to Rx Mode. Disadvantages: Uses more power than sleep mode. Use case: Clearing the FIFO's, Moving the Radio from RX to TX states.
void mvk_Enable_Radio_Rx (unsigned char device_slot, volatile CC_Device_Radio_Status_Flags_type *CC_Device_Radio_Flags)
 Puts the radio in Receive mode.
unsigned char mvk_Enable_Radio_Tx (unsigned char device_slot, volatile CC_Device_Radio_Status_Flags_type *CC_Device_Radio_Status_Flags)
 Puts the radio in Transmit mode.
void mvk_Enable_Frequency_Synth (unsigned char device_slot)
 Enables the internal frequency synthesizer in the radio Advantages: Saves blanking interval time due to oscillator calibration and PLL Stabilization. Disadvantages: Uses more power Use case: Streaming applications. Applications with very short sleep intervals.
void mvk_Cal_Freq_Synth (unsigned char device_slot)
 Starts a calibration of the internal frequency synthesizer in the radio. Advantages: Power is saved if the interval of the calibration is less than the interval of the autocalibration. Disadvantages: If the frequency synthesizer drifts packet error rate will increase. Use case: Very low power applications done by network experienced designers.
void mvk_Power_Down_Radio (unsigned char device_slot)
 Places the Radio in its lowest power setting.
void mvk_Wake_Radio (unsigned char device_slot, volatile CC_Device_Radio_Status_Flags_type *CC_Device_Radio_Status_Flags)
 Wakes the Radio and places it in the IDLE state.
unsigned int mvk_Calculate_Radio_Packet_Time (unsigned char data_rate_in_kHz, unsigned char payload_size)
 Calculate the Packet Time for a Transmit or a Receive of the Chipcon Radio assuming a 64 byte payload.
void mvk_update_Radio_Packet_Time (unsigned char reset_timer)
 updates the Packet Time count and checks for a timed out packet
void mvk_Clear_Radio_Packet (unsigned char device_slot, volatile CC_Device_Radio_Status_Flags_type *CC_Device_Radio_Status_Flags, unsigned char error_level)
 The function clears the RX FIFO. Usually called on an error packet.
void mvk_Set_Packet_Receive_Timer (unsigned char data_rate, unsigned char payload_size)
 Calculate the Packet Time for a Transmit or a Receive of the Chipcon Radio using the provided data rate.
void mvk_Set_Power_CC112X_2442_Radio (unsigned char device_slot, unsigned char set)
 Function powers the PA on the CC1120-2442.
void mvk_Set_RX_TX_CC112X_2442_Radio (unsigned char device_slot, unsigned char set)
 Function sets up power amplifier in the CC1120-2442.
unsigned char mvk_Write_Single_CC_Radio (unsigned char device_slot, unsigned char write_mode, unsigned char radio_register_address, unsigned char radio_write_data)
unsigned char mvk_Write_Extended_CC_Radio (unsigned char device_slot, unsigned char write_mode, unsigned int radio_extended_address, unsigned char radio_write_data)
 Writes a command and a address register to a CC1120 (or similar) type of radios. Then writes the data.
unsigned char mvk_Read_Single_CC_Radio (unsigned char device_slot, unsigned char read_mode, unsigned char radio_register_address)
unsigned char mvk_Read_Burst_CC_Radio (unsigned char device_slot, unsigned char read_mode, unsigned char radio_register_address, unsigned char cs_gate)
unsigned char mvk_Read_Extended_CC_Radio (unsigned char device_slot, unsigned char read_mode, unsigned int radio_extended_address)
 Writes a command and a address register to a CC1120 (or similar) type of radios. Then writes the data.
void mvk_Write_Burst_CC_Radio (unsigned char device_slot, unsigned char write_mode, unsigned char radio_register_address, unsigned char radio_write_data, unsigned char cs_gate)
unsigned char mvk_Send_Command_Strobe_CC_Radio (unsigned char device_slot, unsigned char radio_register_address)
unsigned char mvk_POR_CC_Device_CC_Radio (unsigned char device_slot)
unsigned char mvk_Power_Down_Radio_CC_Radio (unsigned char device_slot, volatile CC_Device_Radio_Status_Flags_type *CC_Device_Radio_Status_Flags)
unsigned char mvk_Init_GDO_CC_Radio (unsigned char device_slot)
void mvk_Enable_GDO_0_CC_Radio (unsigned char device_slot)
void mvk_Disable_GDO_0_CC_Radio (unsigned char device_slot)
void mvk_Clear_TX_Radio_Packet (unsigned char device_slot, volatile CC_Device_Radio_Status_Flags_type *CC_Device_Radio_Status_Flags, unsigned char error_level)
 The function clears the RX FIFO. Usually called on an error packet.
void mvk_Set_Radio_Mode_Registers (unsigned char mode, unsigned radio_slot)
 Allows settings different radio modes.
unsigned char mvk_Get_Current_Radio_Status (unsigned char device_slot)
 Gets the current radio state.
volatile
CC_Device_Radio_Status_Flags_type
mvk_Get_Radio_Status_Flags (unsigned char device_slot)
 Returns the radio status flags of the radio in the passed device slot.
void mvk_After_Receive_Complete (unsigned char device_slot)
 Function is called after a reception has ended.
void mvk_Set_Receive_Mode (unsigned char device_slot)
 Function sets up the radio for receive mode.
void mvk_Set_Transmit_Mode (unsigned char device_slot)
 Function sets up teh radio for transmit mode.
void mvk_After_Transmit_Complete (unsigned char device_slot)
 Function is called after a transmit has ended.
void mvk_Set_Idle_Mode (unsigned char device_slot)
 Function sets up the radio for idle mode.
void mvk_Flush_RX_TX_Buffers (unsigned char device_slot, volatile CC_Device_Radio_Status_Flags_type *CC_Device_Radio_Status_Flags, unsigned char error_level)
 The function clears the RX FIFO. Usually called on an error packet.
signed char mvk_Assess_RSSI (unsigned char channel_number, unsigned char device_slot, volatile CC_Device_Radio_Status_Flags_type *CC_Device_Radio_Status_Flags)
 Determines the RSSI data from the TI CC radio.
signed char mvk_Convert_2_s_Complement_RSSI (unsigned char raw_rssi, unsigned char device_slot)
 Converts the Raw RSSI data from the TI CC radio to 2's complement signed.
unsigned char mvk_Enable_PLL_Calibration (unsigned char device_slot, unsigned char settings)
 This settings enables automatic PLL calibration when changing to or from IDLE state.

Variables

const unsigned char CC2500_radio_table [70]
const unsigned char CC2550_radio_table [50]
const unsigned char CC1100_radio_table [70]
const unsigned char CC1101_radio_table [70]
const unsigned int CC1120_radio_table [340]
const unsigned char CC430F5137_radio_table [70]
unsigned char Transmit_Radio_Slot
unsigned char Receive_Radio_Slot
unsigned char Transceiver_Radio_Slot
volatile
CC_Device_Radio_Status_Flags_type 
Transmitting_Device_Chip_Status_Flags
volatile
CC_Device_Radio_Status_Flags_type 
Receiving_Device_Chip_Status_Flags
volatile
CC_Device_Radio_Status_Flags_type 
Transceiving_Device_Chip_Status_Flags
char Receive_Packet_Data []
char Transmit_Packet_Data []
char Receive_AckPacket_Data []
char Transmit_AckPacket_Data []
volatile unsigned char Bytes_in_Tx_FIFO
volatile Tx_FIFO_typeTx_FIFO
volatile unsigned char Bytes_in_Rx_FIFO
volatile Rx_FIFO_typeRx_FIFO
unsigned char Radio_runt_packet
unsigned char CC_Part_Number
unsigned char CC_Version_Number
volatile unsigned char CC_Device_Chip_Status
volatile
CC_Device_Status_Register_type
CC_Device_Status_Register
volatile unsigned char Main_Radio_Control_State_Machine_Status
volatile unsigned char Frequency_Synth_Calibration_Result
volatile unsigned char Link_Quality_CRC_Status
volatile signed char Received_Signal_Strength
volatile unsigned char Packet_Status
volatile
Packet_Status_Register_type
Packet_Status_Register
volatile unsigned char Frequency_Offset_Estimate
volatile unsigned char Wake_On_Radio_Time_High_Byte
volatile unsigned char Wake_On_Radio_Time_Low_Byte
volatile unsigned char Current_PLL_Setting
volatile unsigned char Last_RC_Oscillator_Calibration_Result_1
volatile unsigned char Last_RC_Oscillator_Calibration_Result_0
volatile unsigned char PTEST_Setting
volatile unsigned char Frequency_Synth_Calibration_Result_0
volatile unsigned char Frequency_Synth_Calibration_Result_1
volatile unsigned char Frequency_Synth_Calibration_Result_2
volatile unsigned char Packet_Automation_Control_0
volatile
Packet_Automation_Control_0_register_type
Packet_Automation_Control_0_register
volatile unsigned char Packet_Automation_Control_1
volatile
Packet_Automation_Control_1_register_type
Packet_Automation_Control_1_register
volatile unsigned char Tx_Front_End_Configuration
volatile
Tx_Front_End_Configuration_Register_type
Tx_Front_End_Configuration_Register
volatile unsigned char Main_Radio_Control_State_Machine
volatile
Main_Radio_Control_State_Machine_register_type
Main_Radio_Control_State_Machine_register
volatile unsigned char This_Device_s_Address
volatile unsigned char Main_Radio_State_Machine_1
volatile
Main_Radio_Control_State_Machine_1_type
Main_Radio_Control_State_Machine_1
volatile
CC112X_Settling_Configuration_register_type
CC112X_Settling_Configuration_register
volatile unsigned char GDO_0_Function_Context
volatile unsigned char GDO_2_Function_Context
unsigned char This_Device_s_Channel
unsigned long int CC112X_Freq_Base
unsigned long int CC112X_Freq_Mult
unsigned long int CC112X_Freq_Max
unsigned char CC5137_PA_Ramping [8]
unsigned char CC1101_PA_Ramping [8]
const unsigned char Frequency_Hopping_List []
const unsigned char Number_Of_Channels

Define Documentation

#define AGC_TEST_DEFAULT   0x3F
#define CC112X_RSSI_OFFSET   102
#define ENABLE_TEMP_SENSOR_AT_IDLE   0xBF
#define FS_TEST_DEFAULT   0x59
#define MAXIMUM_CHANNEL_NUMBER   125
#define MINIMUM_CHANNEL_NUMBER   4
#define NUMBER_OF_RETRIES   3
#define P_TEST_DEFAULT   0x7F
#define RADIO_APPEND_NUM   2
#define RSSI_OFFSET   72
#define TEST_1_DEFAULT   0x31
#define TEST_1_IMPROVE_DATA_RATE_SENSITIVITY   0x35
#define TEST_2_DEFAULT   0x88
#define TEST_2_IMPROVE_DATA_RATE_SENSITIVITY   0x81

Enumeration Type Documentation

Enumerator:
NO_ADDRESS_CHECK 
ADDRESS_CHECK_NO_BROADCAST 
ADDRESS_CHECK_0x00_BROADCAST 
ADDRESS_CHECK_0x00_BROADCAST_0xFF_BROADCAST 
Enumerator:
NORMAL_OPERATION 
GAIN_SETTING_FROZEN_ON_SYNC_WORD 
ANALOG_GAIN_FROZEN_MANUALLY_DIGITAL_GAIN_AUTOMATICALLY_ADJUSTED 
MANUALLY_FREEZE_ANALOG_AND_DIGITAL_GAIN 
Enumerator:
NO_AGC_GAIN_FREEZE_AND_KEEP_UPDATE_RSSI 
FREEZE_AGC_GAIN_AND_KEEP_UPDATING_RSSI 
RSSI_FREEZE_AND_AGC_SLOW_MODE_ENABLED 
FREEZE_BOTH_AGC_GAIN_AND_RSSI 
NO_AGC_GAIN_FREEZE_AND_KEEP_UPDATING_RSSI 
NO_AGC_GAIN_OR_FREEZE_RSSI_AND_AGC_SLOW_MODE_ENABLED 
Enumerator:
AGC_WAIT_24_SAMPLES 
AGC_WAIT_32_SAMPLES 
AGC_WAIT_40_SAMPLES 
AGC_WAIT_48_SAMPLES 
Enumerator:
AGC_WINDOW_8_SAMPLES 
AGC_WINDOW_16_SAMPLES 
AGC_WINDOW_32_SAMPLES 
AGC_WINDOW_64_SAMPLES 
AGC_WINDOW_128_SAMPLES 
AGC_WINDOW_256_SAMPLES 
Enumerator:
NEVER 
WHEN_GOING_FROM_IDLE_TO_TX_RX 
WHEN_GOING_FROM_TX_RX_TO_IDLE 
EVERY_4TH_TIME_GOING_FROM_TX_RX_TO_IDLE 
Enumerator:
_24_DB 
_27_DB 
_30_DB 
_33_DB 
_36_DB 
_38_DB 
_40_DB 
_42_DB 
Enumerator:
AVERAGING_LENGTH_IS_8_SAMPLES 
AVERAGING_LENGTH_IS_16_SAMPLES 
AVERAGING_LENGTH_IS_32_SAMPLES 
AVERAGING_LENGTH_IS_64_SAMPLES 
Enumerator:
PARTNUM_CHIP_ID 
VERSION_CHIP_ID 
FREQEST_FREQUENCY_OFFSET_ESTIMATOR 
LQI_LINK_QUALITY_ESTIMATOR 
RSSI_RECEIVED_SIGNAL_STRENGTH_INDICATOR 
MARC_STATE_MAIN_RADIO_CONTROL_STATE_MACHINE_STATUS 
WORTIME_1_WAKE_ON_RADIO_TIMER_HIGH_BYTE 
WORTIME_0_WAKE_ON_RADIO_TIMER_LOW_BYTE 
PKTSTATUS_GPIO_AND_PACKET_STATUS_REGISTER 
VCO_VC_DAC_CURRENT_CALIBRATION_FROM_PLL_CALIBRATION_MODULE 
TX_BYTES_UNDERFLOW_AND_NUMBER_OF_BYTES_REGISTER 
RX_BYTES_OVERFLOW_AND_NUMBER_OF_BYTES_REGISTER 
RCCTRL_1_STATUS_LAST_RC_OSCILLATOR_CALIBRATION_RESULT 
RCCTRL_0_STATUS_LAST_RC_OSCILLATOR_CALIBRATION_RESULT 
Enumerator:
CC112X_PARTNUM_CHIP_ID 
CC112X_VERSION_CHIP_ID 
CC112X_IOCFG0D_GDO_0_OUTPUT_PIN_CONFIGURATION 
CC112X_IOCFG2D_GDO_2_OUTPUT_PIN_CONFIGURATION 
CC112X_IOCFG3D_GDO_3_OUTPUT_PIN_CONFIGURATION 
CC112X_PACKET_CONFIGURATION_0 
CC112X_PACKET_CONFIGURATION_1 
CC112X_PACKET_CONFIGURATION_2 
CC112X_PA_CONFIGURATION_0 
CC112X_PA_CONFIGURATION_2 
CC112X_MODEM_CONFIGURATION_0 
CC112X_SOFT_TX_DATA_CONFIGURATION 
CC112X_SYNC_CONFIGURATION_1 
CC112X_AGC_CONFIGURATION_1 
CC112X_DEVICE_ADDRESS 
CC112X_SETTLING_CONFIGURATION 
CC112X_RF_END_CONFIGURATION_0 
CC112X_RF_END_CONFIGURATION_1 
CC112X_MODEM_CONFIGURATION_1 
CC112X_PACKET_LENGTH 
CC112X_RSSI_VALUE 
CC112X_CRC_LINK_QUALITY 
CC112X_NUM_TXBYTES 
CC112X_NUM_RXBYTES 
CC112X_SET_FREQUENCY_BYTE_0 
CC112X_SET_FREQUENCY_BYTE_1 
CC112X_SET_FREQUENCY_BYTE_2 
CC112X_FSCALIBRATE_CONTROL 
Enumerator:
RADIO_ACK_RECEIVED 
RADIO_NAK_RECEIVED 
Enumerator:
CC_RADIO_PACKET_PROCESS_SUCCESS 
CC_RADIO_SLOT_ERROR 
Enumerator:
NEW_DATA_PACKET_RECEIVED 
NO_NEW_DATA 
Enumerator:
USE_GDO_2_RF_SWITCH 
ANTENNA_DIVERSITY_LEFT 
ANTENNA_DIVERSITY_RIGHT 
Enumerator:
CC_RADIO_SET_SUCCESSFULL 
CC_RADIO_SET_VERIFY_ERROR 
CC_PACKET_SET_OVER_FIFO_SIZE 
CC_PA_POINTER_SET_OVER_TABLE_SIZE 
CC_CHANNEL_SPACING_BOUNDARY_ERROR 
CC_DESIRED_CHANNEL_OUT_OF_RANGE 
CC_RADIO_PARAMETER_OUT_OF_RANGE 
CC_RADIO_RUNT_PACKET_FOUND 
CC_RADIO_NO_ERRORS 
CC_RADIO_SET_FAILED 
CC_RADIO_CHANGE_CHANNEL_ERROR 
Enumerator:
CC_RADIO_INIT_SUCCESSFUL 
CC_RADIO_INIT_VERIFY_ERROR 
NO_CC_RADIO_FOUND 
Enumerator:
CC_RADIO_RX_FIFO_SUCCESSFUL 
CC_RADIO_RX_VARIABLE_PACKET_ERROR 
CC_RADIO_RX_PACKET_SIZE_MISMATCH 
CC_RADIO_RX_ADDRESS_MISMATCH 
CC_RADIO_RX_BROADCAST_ADDRESS_RX 
CC_RADIO_RX_DHCP_ADDRESS_RX 
CC_RADIO_RX_OWN_ADDRESS_RX 
CC_RADIO_RX_FIFO_OVERFLOW 
CC_RADIO_RX_NULL_PACKET 
CC_RADIO_RX_CRC_ERROR 
Enumerator:
CC_RADIO_TX_FIFO_SUCCESSFUL 
CC_RADIO_TX_BUFFER_NOT_EMPTY 
CC_RADIO_STRING_TRUNCATED 
CC_RADIO_TX_BUFFER_UNDERFLOW 
CC_RADIO_TX_FIFO_CONFIGURATION_ERROR 
Enumerator:
_8_SAMPLES 
_16_SAMPLES 
_24_SAMPLES 
_32_SAMPLES 
Enumerator:
ALWAYS 
IF_RSSI_IS_BELOW_THRESHOLD 
UNLESS_CURRENTLY_RECEIVING_PACKET 
IF_RSSI_IS_BELOW_THRESHOLD_UNLESS_CURRENTLY_RECEIVING_PACKET 
IF_RSSI_IS_BELOW_THRESHOLD_AND_MEETS_ETSI_LBT_REQUIREMENTS 
Enumerator:
SRES_SOFTWARE_RESET 
SFS_TX_ON_ENABLE_AND_CALIBRATE_FREQUENCY_SYNTHESIZER 
SX_OFF_TURN_OFF_CRYSTAL_OSCILLATOR 
SCAL_CALIBRATE_FREQUENCY_SYNTHESIZER_AND_TURN_IT_OFF 
SRX_ENABLE_RX 
STX_ENABLE_TX 
SIDLE_EXIT_RX_TX_TURN_OFF_FREQUENCY_SYNTHESIZER 
SIDLE_EXIT_WAKE_ON_RADIO_MODE 
SWOR_START_WAKE_ON_RADIO_RX_POLLING_SEQUENCE 
SPWD_ENTER_POWER_DOWN_MODE 
SFRX_FLUSH_RX_FIFO 
SFTX_FLUSH_TX_FIFO 
SWORRST_RESET_REAL_TIME_CLOCK 
SNOP_SPI_NO_OPERATION_USED_TO_GET_CHIP_STATUS_BYTE 
Enumerator:
CRC_DISABLED_FOR_TX_AND_RX 
CRC_CALCULATION_ON_TX_AND_CHECK_ON_RX_INIT_ONES 
CRC_CALCULATION_ON_TX_AND_CHECK_ON_RX_INIT_ZEROS 
Enumerator:
NO_DATA_RATE_OFFSET_COMPENSATION 
PLUS_MINUS_3_125_PERCENT_DATA_RATE_OFFSET 
PLUS_MINUS_6_25_PERCENT_DATA_RATE_OFFSET 
PLUS_MINUS_12_5_PERCENT_DATA_RATE_OFFSET 
Enumerator:
HIGH_POWER 
LOW_POWER 
Enumerator:
_1_PERIOD 
_32_PERIODS 
Enumerator:
_4_CLOCK_PERIODS 
_6_CLOCK_PERIODS 
_8_CLOCK_PERIODS 
_12_CLOCK_PERIODS 
_16_CLOCK_PERIODS 
_24_CLOCK_PERIODS 
_32_CLOCK_PERIODS 
_48_CLOCK_PERIODS 
Enumerator:
_61_BYTES_TX_4_BYTES_RX 
_57_BYTES_TX_8_BYTES_RX 
_53_BYTES_TX_12_BYTES_RX 
_49_BYTES_TX_16_BYTES_RX 
_45_BYTES_TX_20_BYTES_RX 
_41_BYTES_TX_24_BYTES_RX 
_37_BYTES_TX_28_BYTES_RX 
_33_BYTES_TX_32_BYTES_RX 
_29_BYTES_TX_36_BYTES_RX 
_25_BYTES_TX_40_BYTES_RX 
_21_BYTES_TX_44_BYTES_RX 
_17_BYTES_TX_48_BYTES_RX 
_13_BYTES_TX_52_BYTES_RX 
_9_BYTES_TX_56_BYTES_RX 
_5_BYTES_TX_60_BYTES_RX 
_1_BYTES_TX_64_BYTES_RX 
Enumerator:
Same_As_FOC_Loop_Gain_Before_Sync_Detect 
Same_As_Clock_Recovery_Integral_Gain_Pre_Sync 
Same_As_Clock_Recovery_Proportaional_Gain_Pre_Sync 
K_Div_By_2 
Enumerator:
_K 
_2_K 
_3_K 
_4_K 
Enumerator:
NO_FREQUENCY_OFFSET_COMPENSATION 
CHANNEL_BANDWIDTH_DIVIDED_BY_8 
CHANNEL_BANDWIDTH_DIVIDED_BY_4 
CHANNEL_BANDWIDTH_DIVIDED_BY_2 
Enumerator:
LNA_2_GAIN_DECREASED_FIRST 
LNA_GAIN_DECREASED_FIRST 
Enumerator:
IDLE_STATE 
RX_STATE 
TX_STATE 
FAST_TX_STATE 
CALIBRATE 
PLL_SETTLING 
RX_FIFO_OVERFLOW 
TX_FIFO_UNDERFLOW 
Enumerator:
NO_HYSTERESIS_SMALL_SYMMETRIC_DEAD_ZONE_HIGH_GAIN 
LOW_HYSTERESIS_SMALL_SYMMETRIC_DEAD_ZONE_MEDIUM_GAIN 
MEDIUM_HYSTERESIS_SMALL_SYMMETRIC_DEAD_ZONE_MEDIUM_GAIN 
LARGE_HYSTERESIS_SMALL_SYMMETRIC_DEAD_ZONE_LOW_GAIN 
Enumerator:
FSM_SLEEP 
FSM_IDLE 
FSM_XOFF 
FSM_VCO_ON_MAN_CAL 
FSM_REGULATOR_ON_MAN_CAL 
FSM_MANUAL_CAL 
FSM_VCO_ON_WAKE 
FSM_REGULATOR_ON_WAKE 
FSM_START_CAL 
FSM_BW_BOOST 
FSM_FREQ_SYNTH_LOCK 
FSM_ADC_ON 
FSM_END_CAL 
FSM_RECEIVE 
FSM_RECEIVE_END 
FSM_RECEIVE_RESET 
FSM_RECEIVE_FIFO_OVERFLOW 
FSM_TX_RX_SWITCH 
FSM_RX_TX_SWITCH 
FREQ_SYNTH_TRANSMIT_ON 
FSM_TRANSMIT 
FSM_TRANSMIT_END 
FSM_TRANSMIT_FIFO_OVERFLOW 
Enumerator:
ABSOLUTE_CARRIER_SENSE_THRESHOLD_DISABLED 
_7_DB_BELOW_MAGNITUDE_TARGET 
_6_DB_BELOW_MAGNITUDE_TARGET 
_5_DB_BELOW_MAGNITUDE_TARGET 
_4_DB_BELOW_MAGNITUDE_TARGET 
_3_DB_BELOW_MAGNITUDE_TARGET 
_2_DB_BELOW_MAGNITUDE_TARGET 
_1_DB_BELOW_MAGNITUDE_TARGET 
AT_MAGNITUDE_TARGET 
_1_DB_ABOVE_MAGNITUDE_TARGET 
_2_DB_ABOVE_MAGNITUDE_TARGET 
_3_DB_ABOVE_MAGNITUDE_TARGET 
_4_DB_ABOVE_MAGNITUDE_TARGET 
_5_DB_ABOVE_MAGNITUDE_TARGET 
_6_DB_ABOVE_MAGNITUDE_TARGET 
_7_DB_ABOVE_MAGNITUDE_TARGET 
Enumerator:
ALL_GAIN_SETTINGS_CAN_BE_USED 
HIGHEST_GAIN_SETTING_CAN_NOT_BE_USED 
_2_HIGHEST_GAIN_SETTINGS_CAN_NOT_BE_USED 
_3_HIGHEST_GAIN_SETTINGS_CAN_NOT_BE_USED 
Enumerator:
MAXIMUM_LNA_PLUS_LNA_2_GAIN 
APPROX_2_6_DB_BELOW_MAXIMUM_GAIN 
APPROX_6_1_DB_BELOW_MAXIMUM_GAIN 
APPROX_7_4_DB_BELOW_MAXIMUM_GAIN 
APPROX_9_2_DB_BELOW_MAXIMUM_GAIN 
APPROX_11_5_DB_BELOW_MAXIMUM_GAIN 
APPROX_14_6_DB_BELOW_MAXIMUM_GAIN 
APPROX_17_1_DB_BELOW_MAXIMUM_GAIN 
Enumerator:
PA_TABLE_POWER_AMP_TABLE 
TX_FIFO_WRITE 
RX_FIFO_READ 
Enumerator:
IOCFG1_GDO_1_OUTPUT_PIN_CONFIGURATION 
FIFO_THR_RX_AND_TX_THRESHOLDS 
SYNC_1_SYNC_WORD_HIGH_BYTE 
SYNC_0_SYNC_WORD_LOW_BYTE 
MCSM_2_MAIN_RADIO_CONTROL_STATE_MACHINE_CONFIGURATION 
MCSM_1_MAIN_RADIO_CONTROL_STATE_MACHINE_CONFIGURATION 
WOREVT_1_WAKE_ON_RADIO_EVENT_0_TIMEOUT_HIGH_BYTE 
WOREVT_0_WAKE_ON_RADIO_EVENT_0_TIMEOUT_LOW_BYTE 
WORCTRL_0_WAKE_ON_RADIO_CONTROL 
RC_CNTRL_1_RC_OSCILLATOR_CONFIGURATION 
RC_CNTRL_0_RC_OSCILLATOR_CONFIGURATION 
AGCTEST_AGC_TEST 
PRODUCTION_TEST 
Enumerator:
GDO_ACTIVE_HIGH 
GDO_ACTIVE_LOW 
Enumerator:
NORMAL_FIFO_MODE 
SYNCHRONOUS_SERIAL_MODE 
RANDOM_DATA_MODE 
Enumerator:
FIXED_LENGTH 
VARIABLE_LENGTH 
INFINITE_LENGTH 
Enumerator:
CC2500_2_4_GHZ_MINUS_55DBM_OR_LESS_AT_8_4_MA 
CC2500_2_4_GHZ_MINUS_30DBM_AT_9_9_MA 
CC2500_2_4_GHZ_MINUS_28DBM_AT_9_7_MA 
CC2500_2_4_GHZ_MINUS_26DBM_AT_10_2_MA 
CC2500_2_4_GHZ_MINUS_24DBM_AT_10_1_MA 
CC2500_2_4_GHZ_MINUS_22DBM_AT_10_0_MA 
CC2500_2_4_GHZ_MINUS_20DBM_AT_10_1_MA 
CC2500_2_4_GHZ_MINUS_18DBM_AT_11_7_MA 
CC2500_2_4_GHZ_MINUS_16DBM_AT_10_8_MA 
CC2500_2_4_GHZ_MINUS_14DBM_AT_12_2_MA 
CC2500_2_4_GHZ_MINUS_12DBM_AT_11_1_MA 
CC2500_2_4_GHZ_MINUS_10DBM_AT_12_2_MA 
CC2500_2_4_GHZ_MINUS_8DBM_AT_14_1_MA 
CC2500_2_4_GHZ_MINUS_6DBM_AT_15_0_MA 
CC2500_2_4_GHZ_MINUS_4DBM_AT_16_2_MA 
CC2500_2_4_GHZ_MINUS_2DBM_AT_17_7_MA 
CC2500_2_4_GHz_0DBM_AT_21_2_MA 
CC2500_2_4_GHZ_PLUS_1DBM_AT_21_5_MA 
CC2550_2_4_GHZ_MINUS_12DBM_AT_11_2_MA 
CC2550_2_4_GHZ_MINUS_6DBM_AT_14_7_MA 
CC2550_2_4_GHZ_0DBM_AT_19_4_MA 
CC2550_2_4_GHZ_1DBM_AT_21_3_MA 
CC1100_315_MHZ_MINUS_30DBM_AT_10_6_MA 
CC1100_315_MHZ_MINUS_20DBM_AT_11_1_MA 
CC1100_315_MHZ_MINUS_15DBM_AT_11_8_MA 
CC1100_315_MHZ_MINUS_10DBM_AT_13_0_MA 
CC1100_315_MHZ_MINUS_5DBM_AT_12_9_MA 
CC1100_315_MHZ_0DBM_AT_14_8_MA 
CC1100_315_MHZ_PLUS_5DBM_AT_18_1_MA 
CC1100_315_MHZ_PLUS_7DBM_AT_22_1_MA 
CC1100_315_MHZ_PLUS_10DBM_AT_27_1_MA 
CC1100_433_MHZ_MINUS_30DBM_AT_11_5_MA 
CC1100_433_MHZ_MINUS_20DBM_AT_12_1_MA 
CC1100_433_MHZ_MINUS_15DBM_AT_12_7_MA 
CC1100_433_MHZ_MINUS_10DBM_AT_14_0_MA 
CC1100_433_MHZ_MINUS_5DBM_AT_13_7_MA 
CC1100_433_MHZ_0DBM_AT_15_6_MA 
CC1100_433_MHZ_PLUS_5DBM_AT_19_1_MA 
CC1100_433_MHZ_PLUS_7DBM_AT_24_2_MA 
CC1100_433_MHZ_PLUS_10DBM_AT_29_2_MA 
CC1100_915_MHZ_MINUS_30DBM_AT_11_5_MA 
CC1100_915_MHZ_MINUS_20DBM_AT_12_1_MA 
CC1100_915_MHZ_MINUS_15DBM_AT_12_7_MA 
CC1100_915_MHZ_MINUS_10DBM_AT_14_0_MA 
CC1100_915_MHZ_MINUS_5DBM_AT_13_7_MA 
CC1100_915_MHZ_0DBM_AT_15_6_MA 
CC1100_915_MHZ_PLUS_5DBM_AT_19_1_MA 
CC1100_915_MHZ_PLUS_7DBM_AT_24_2_MA 
CC1100_915_MHZ_PLUS_10DBM_AT_29_2_MA 
CC1101_915_MHZ_MINUS_30DBM_AT_11_5_MA 
CC1101_915_MHZ_MINUS_20DBM_AT_12_1_MA 
CC1101_915_MHZ_MINUS_15DBM_AT_12_7_MA 
CC1101_915_MHZ_MINUS_10DBM_AT_14_0_MA 
CC1101_915_MHZ_MINUS_5DBM_AT_13_7_MA 
CC1101_915_MHZ_0DBM_AT_15_6_MA 
CC1101_915_MHZ_PLUS_5DBM_AT_19_1_MA 
CC1101_915_MHZ_PLUS_7DBM_AT_24_2_MA 
CC1101_915_MHZ_PLUS_10DBM_AT_29_2_MA 
CC430F5137_915_MHZ_PLUS_12DBM_AT_34_8_MA 
CC430F5137_915_MHZ_PLUS_10DBM_AT_32_1_MA 
CC430F5137_915_MHZ_PLUS_8_8DBM 
CC430F5137_915_MHZ_0DBM_AT_17_6_MA 
CC430F5137_915_MHZ_MINUS_6DBM_AT_17_6_MA 
CC430F5137_915_MHZ_MINUS_12DBM 
CC430F5137_915_MHZ_MINUS_30DBM 
Enumerator:
RX_FIFO_THRESHOLD 
RX_FIFO_THRESHOLD_PACKET_COMPLETE 
TX_FIFO_THRESHOLD 
TX_FIFO_FULL 
RX_FIFO_OVERFLOW_ERROR 
TX_FIFO_UNDERFLOW_ERROR 
SYNC_WORD_SENT_RECEIVED 
CRC_OK_PACKET_RECEIVED 
PREAMBLE_QUALITY_REACHED 
SERIAL_CLK 
CLEAR_CHANNEL_ASSESSMENT 
SERIAL_DATA_RX_MODE 
PLL_LOCKED 
CC112X_PLL_LOCKED 
GENERAL_PURPOSE_LEVEL_INTERRUPT 
SERIAL_CLOCK_OUTPUT 
PREAMBLE_PROGRAMMED_QUALITY_REACHED 
SERIAL_DATA_OUTPUT 
PREAMBLE_QUALITY_VALID 
SERIAL_TRANSPARENT_DATA_OUT 
RSSI_VALID 
CARRIER_SENSED 
CRC_OK 
CARRIER_SENSE_VALID 
CARRIER_SENSE 
PACKET_RECEIVED_WITH_VALID_CRC 
MCU_WAKE_UP_SIGNAL_BY_MARC 
RX_HARD_DATA_0 
RX_HARD_DATA_1 
POWER_AMP_ENABLE 
LNA_ENABLE 
WAKE_ON_RADIO_EVENT_0 
WAKE_ON_RADIO_EVENT_1 
CHIP_READY 
XOSC_STABLE 
SERIAL_TX_DATA 
HI_Z 
PULLED_LOW 
CLOCK_OSCILLATOR 
CLOCK_OSCILLATOR_DIVIDED_BY_1_5 
CLOCK_OSCILLATOR_DIVIDED_BY_2 
CLOCK_OSCILLATOR_DIVIDED_BY_3 
CLOCK_OSCILLATOR_DIVIDED_BY_4 
CLOCK_OSCILLATOR_DIVIDED_BY_6 
CLOCK_OSCILLATOR_DIVIDED_BY_8 
CLOCK_OSCILLATOR_DIVIDED_BY_12 
CLOCK_OSCILLATOR_DIVIDED_BY_16 
CLOCK_OSCILLATOR_DIVIDED_BY_24 
CLOCK_OSCILLATOR_DIVIDED_BY_32 
CLOCK_OSCILLATOR_DIVIDED_BY_48 
CLOCK_OSCILLATOR_DIVIDED_BY_64 
CLOCK_OSCILLATOR_DIVIDED_BY_96 
CLOCK_OSCILLATOR_DIVIDED_BY_128 
CLOCK_OSCILLATOR_DIVIDED_BY_192 
Enumerator:
MANUALLY_CALIBRATE 
IDLE_TO_RX_OR_TX 
RX_OR_TX_TO_IDLE 
EVERY_FOURTH_RX_OR_TX_TO_IDLE 
Enumerator:
APPROXIMATELY_2_3_US_AFTER_XOSC_START 
APPROXIMATELY_37_US_AFTER_XOSC_START 
APPROXIMATELY_150_US_AFTER_XOSC_START 
APPROXIMATELY_600_US_AFTER_XOSC_START 
Enumerator:
_2_PREAMBLE_BYTES 
_3_PREAMBLE_BYTES 
_4_PREAMBLE_BYTES 
_6_PREAMBLE_BYTES 
_8_PREAMBLE_BYTES 
_12_PREAMBLE_BYTES 
_16_PREAMBLE_BYTES 
_24_PREAMBLE_BYTES 
Enumerator:
ERROR_RADIO_COMMAND_NOT_SUPPORTED 
INVALID_RADIO_CONFIGURATION 
Enumerator:
TX_NORMAL 
TX_RANDOM 
TX_UNMODULATED 
RX_NORMAL 
Enumerator:
RADIO_IS_IDLE 
RADIO_IS_TRANSMITTING 
RADIO_IS_RECEIVING 
RADIO_IS_IN_RSSI_SCAN 
Enumerator:
FSK_MODULATION 
GFSK_MODULATION 
OOK_MODULATION 
MSK_MODULATION 
Enumerator:
RADIO_PACKET_READ 
RADIO_PACKET_WRITE 
RADIO_PACKET_READ_BURST 
RADIO_PACKET_WRITE_BURST 
Enumerator:
CC1120_PART_NUMBER 
CC2500_PART_NUMBER 
CC2550_PART_NUMBER 
CC1100_PART_NUMBER 
enum Radio_Type
Enumerator:
RECEIVING_RADIO 
TRANSMITTING_RADIO 
TRANSCEIVING_RADIO 
Enumerator:
CC1120_VERSION_NUMBER 
CC2500_VERSION_NUMBER 
CC2550_VERSION_NUMBER 
CC1100_VERSION_NUMBER 
CC1101_VERSION_NUMBER 
CC430_VERSION_NUMBER 
Enumerator:
IOCFG2_GDO_2_OUTPUT_PIN_CONFIGURATION 
IOCFG0D_GDO_0_OUTPUT_PIN_CONFIGURATION 
PKTLEN_PACKET_LENGTH 
PKTCTRL_1_PACKET_AUTOMATION_CONTROL 
PKTCTRL_0_PACKET_AUTOMATION_CONTROL 
ADDR_DEVICE_ADDRESS 
CHANNR_CHANNEL_NUMBER 
FSCTRL_1_FREQUENCY_SYNTHESIZER_CONTROL 
FSCTRL_0_FREQUENCY_SYNTHESIZER_CONTROL 
FREQ_2_FREQUENCY_CONTROL_WORD_HIGH_BYTE 
FREQ_1_FREQUENCY_CONTROL_WORD_MIDDLE_BYTE 
FREQ_0_FREQUENCY_CONTROL_WORD_LOW_BYTE 
MDMCFG_4_MODEM_CONFIGURATION 
MDMCFG_3_MODEM_CONFIGURATION 
MDMCFG_2_MODEM_CONFIGURATION 
MDMCFG_1_MODEM_CONFIGURATION 
MDMCFG_0_MODEM_CONFIGURATION 
DEVIATN_MODEM_DEVIATION_SETTING 
MCSM_0_MAIN_RADIO_CONTROL_STATE_MACHINE_CONFIGURATION 
FOCCFG_FREQUENCY_OFFSET_COMPENSATION_CONFIGURATION 
BSCFG_IT_SYNCHRONIZATION_CONFIGURATION 
AGCCTRL_2_AGC_CONTROL 
AGCCTRL_1_AGC_CONTROL 
AGCCTRL_0_AGC_CONTROL 
FREND_1_FRONT_END_RX_CONFIGURATION 
FREND_0_FRONT_END_RX_CONFIGURATION 
FSCAL_3_FREQUENCY_SYNTHESIZER_CALIBRATION 
FSCAL_2_FREQUENCY_SYNTHESIZER_CALIBRATION 
FSCAL_1_FREQUENCY_SYNTHESIZER_CALIBRATION 
FSCAL_0_FREQUENCY_SYNTHESIZER_CALIBRATION 
FSTEST_FREQUENCY_SYNTHESIZER_CALIBRATION 
TEST_2_VARIOUS_TEST_SETTINGS 
TEST_1_VARIOUS_TEST_SETTINGS 
TEST_0_VARIOUS_TEST_SETTINGS 
Enumerator:
RELATIVE_CARRIER_SENSE_THRESHOLD_DISABLED 
_6_DB_INCREASE_IN_RSSI_VALUE 
_10_DB_INCREASE_IN_RSSI_VALUE 
_14_DB_INCREASE_IN_RSSI_VALUE 
Enumerator:
EVENT_0_TIMES_3_6058_OR_18_0288 
EVENT_0_TIMES_1_8029_OR_9_0144 
EVENT_0_TIMES_0_9014_OR_4_5072 
EVENT_0_TIMES_0_4507_OR_2_2536 
EVENT_0_TIMES_0_2254_OR_1_1268 
EVENT_0_TIMES_0_1127_OR_0_5634 
EVENT_0_TIMES_0_0563_OR_0_2817 
UNTIL_END_OF_PACKET 
Enumerator:
NORMAL_MODE_USE_FIFOS_FOR_RX_TX 
LEGACY_SERIAL_SYNCHRONOUS_MODE 
TX_PN9_RANDOM_DATA 
ASYNCHRONOUS_TRANSPARENT_MODE 
Enumerator:
NO_PREAMBLE_SYNC 
_15_16_WORD_BITS_DETECTED 
_16_16_WORD_BITS_DETECTED 
_30_32_WORD_BITS_DETECTED 
NO_PREAMBLE_SYNC_CARRIER_DETECTED 
_15_16_WORD_BITS_CARRIER_DETECTED 
_16_16_WORD_BITS_CARRIER_DETECTED 
_30_32_WORD_BITS_CARRIER_DETECTED 
Enumerator:
TRANSCEIVER_IDLE 
TRANSCEIVER_LOCKED 
Enumerator:
TRANSMIT_SUCCESSFUL 
TRANSMIT_UNSUCCESSFUL 
ACK_RECEIVED 
ACK_NOT_RECEIVED 
ACK_NOT_RECEIVED_TRANSMIT_ONLY 
TRANSMIT_SUCCESSFUL 
TRANSMIT_UNSUCCESSFUL 
ACK_RECEIVED 
ACK_NOT_RECEIVED 
ACK_NOT_RECEIVED_TRANSMIT_ONLY 
Enumerator:
MODE_RETURNS_TO_IDLE 
FS_TX_ON 
MODE_TX 
STAY_IN_TX 
MODE_RX 
STAY_IN_RX 

Function Documentation

void mvk_After_Receive_Complete ( unsigned char  device_slot)

Function is called after a reception has ended.

Parameters:
[in]device_slotThe slot that the radio is in
Returns:
None
void mvk_After_Transmit_Complete ( unsigned char  device_slot)

Function is called after a transmit has ended.

Parameters:
[in]device_slotThe slot that the radio is in
Returns:
None
signed char mvk_Assess_RSSI ( unsigned char  channel_number,
unsigned char  device_slot,
volatile CC_Device_Radio_Status_Flags_type CC_Device_Radio_Status_Flags 
)

Determines the RSSI data from the TI CC radio.

Parameters:
[in]channel_numberDesired channel for the radio to communicate
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
[in]CC_Device_Radio_Status_FlagsPointer to the Radio flags attached to the device slot.
Returns:
Signed RSSI Data
CC_RADIO_CHANGE_CHANNEL_ERROR Change channel error
void mvk_Cal_Freq_Synth ( unsigned char  device_slot)

Starts a calibration of the internal frequency synthesizer in the radio. Advantages: Power is saved if the interval of the calibration is less than the interval of the autocalibration. Disadvantages: If the frequency synthesizer drifts packet error rate will increase. Use case: Very low power applications done by network experienced designers.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
Returns:
None
unsigned int mvk_Calculate_Radio_Packet_Time ( unsigned char  data_rate_in_kHz,
unsigned char  payload_size 
)

Calculate the Packet Time for a Transmit or a Receive of the Chipcon Radio assuming a 64 byte payload.

The function will perform a determine the apporximate number of cycles in a delay loop to delay the indicated number of ms.

Parameters:
[in]data_rate_in_kHzData rate of the radio transmit and receive (needs multiplied by 1000 to get bits/s
[in]payload_sizePayload size in Bytes of the tranmitted and received packet. If variable, assume max packet size
Returns:
packet_time Value of the SMClock that would expire after a failure to receive or transmit the full payload
Note:
This function sets the time it should take for a radio transmission or reception. Mainly used for PER tests where a receive will eventually fail. On the expiration of the timer, the radio is reset to a receive mode and the packet FIFO is cleared. This signals a partial packet was received and then interrupted. Resetting the packet synchronizes the payload length and address expected by the receiving radio.
unsigned char mvk_Change_Channel ( unsigned char  channel_number,
unsigned char  device_slot,
volatile CC_Device_Radio_Status_Flags_type CC_Device_Radio_Status_Flags 
)

This function changes the channel (carrier frequency) the Radio uses to transmit and receive Commonly used to avoid collisions or channel frequency with high noise levels. The initial channel is set by Smart RF studio in init_CC_Device The radio is set to IDLE mode after the end of this function.

Channel_Spacing is boundary checked by this routine and if set to zero or greater than 127 will signal the calling routine of an error

Parameters:
[in]channel_numberDesired channel for the radio to communicate
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
[in]CC_Device_Radio_Status_FlagsPointer to the Radio flags attached to the device slot.
Returns:
CC_RADIO_SET_SUCCESSFULL - By default this message is set to be successful
CC_RADIO_SET_VERIFY_ERROR - but will be overwrittend by the part was programmed but the register verifacation failed
CC_CHANNEL_SPACING_BOUNDARY_ERROR - Signals the calling routine that the channel spacing is too great or is zero.
CC_DESIRED_CHANNEL_OUT_OF_RANGE - Signals the calling routine that the channel is over 255 which is out of the range of the channel byte
CC_RADIO_SET_FAILED - The channel change was unsuccessful
Note:
This function was originally set by the SmartRF Studio initialization. Since there are several registers bits untouched, we do a READ of the register, followed by a MODIFY of the target register, followed by a WRITE back to memory, and finally a VERIFY.
unsigned char mvk_Check_for_Packet_Errors ( void  )

Checks for a Runt Packet Error. If present, the routine handles the error by clearing the FIFO and resetting the radio. Runt Packet occurs if the radio is receiving and the full payload hasn't arrived when the payload timer expires.

Returns:
NONE
unsigned char mvk_check_GDO_2 ( unsigned char  device_slot)

Enables the GD0_2 function on the indicated CC430F5137 device.

The function will enable the GD0_2 function on the specified CC430F5137 part.

Parameters:
[in]device_slotMAVRK slot occupied by the given device (MAVRK_AFE1 - MAVRK_AFE4)
Returns:
GDO_2 Level

Enables the GD0_2 function on the indicated CC430F5137 device.

The function will enable the GD0_2 function on the specified CC2500 part.

Parameters:
[in]device_slotMAVRK slot occupied by the given device (MAVRK_AFE1 - MAVRK_AFE4)
Returns:
GDO_2 Interrupt Level
unsigned char mvk_Check_PLL_Lock ( unsigned char  device_slot)

Checks whether the radio has PLL lock.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
Returns:
SET Radio has PLL lock
CLEAR Radio does not have PLL lock
unsigned char mvk_Check_Radio_Calibration_Complete ( unsigned char  device_slot)

Checks whether the radio has completed calibration.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
Returns:
MAVRK_SUCCESSFUL Radio calibration completed successdfully
MAVRK_FAILED Radio calibration was not completed successfully
void mvk_Clear_Bad_Receive_Packet ( void  )

Used to clear a bad or runt packet.

Returns:
NONE
void mvk_Clear_Radio_Packet ( unsigned char  device_slot,
volatile CC_Device_Radio_Status_Flags_type CC_Device_Radio_Status_Flags,
unsigned char  error_level 
)

The function clears the RX FIFO. Usually called on an error packet.

The function resets the Radio to a receive mode and flushes the RX FIFO. It can also be trapped permanently by a Critical Error Level

Parameters:
[in]device_slotDevice Slot of the Radio being reset
[in]CC_Device_Radio_Status_FlagsFlags used to monitor the state of the Radio being reset
[in]error_levelError level sent to the error trap
Returns:
None
void mvk_Clear_TX_Radio_Packet ( unsigned char  device_slot,
volatile CC_Device_Radio_Status_Flags_type CC_Device_Radio_Status_Flags,
unsigned char  error_level 
)

The function clears the RX FIFO. Usually called on an error packet.

The function resets the Radio to a receive mode and flushes the RX FIFO. It can also be trapped permanently by a Critical Error Level

Parameters:
[in]device_slotDevice Slot of the Radio being reset
[in]CC_Device_Radio_Status_FlagsFlags used to monitor the state of the Radio being reset
[in]error_levelError level sent to the error trap
Returns:
None
signed char mvk_Convert_2_s_Complement_RSSI ( unsigned char  raw_rssi,
unsigned char  device_slot 
)

Converts the Raw RSSI data from the TI CC radio to 2's complement signed.

Parameters:
[in]raw_rssiRSSI Data in 2's Complement
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
Returns:
Signed RSSI Data
unsigned char mvk_Disable_Address_Check ( unsigned char  device_slot)

Disables the Address Byte saving a Byte Advantages: Saves 1 Byte in the payload Disadvantages: Radio is more active in receive mode forcing fast inspection of the packet (so that it can be returned to the RX state) Use case: Streaming applications. Applications that are monitoring network packet activity.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
Returns:
CC_RADIO_SET_SUCCESSFULL - By default this message is set to be successful
CC_RADIO_SET_VERIFY_ERROR - but will be overwrittend by the part was programmed but the register verifacation failed
Note:
This function was originally set by the SmartRF Studio initialization. Since there are several registers bits untouched, we do a READ of the register, followed by a MODIFY of the target register, followed by a WRITE back to memory, and finally a VERIFY.
unsigned char mvk_Disable_Append_Status ( unsigned char  device_slot)

Disables the Append Status Registers Advantages: Saves 2 Byte in the payload. Disadvantages: Continuous monitoring of the RSSI and LQI registers will need to be done on each packet. Use case: Streaming applications. Antenna Diversity Applications.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
Returns:
CC_RADIO_SET_SUCCESSFULL - By default this message is set to be successful
CC_RADIO_SET_VERIFY_ERROR - but will be overwrittend by the part was programmed but the register verifacation failed
Note:
This function was originally set by the SmartRF Studio initialization. Since there are several registers bits untouched, we do a READ of the register, followed by a MODIFY of the target register, followed by a WRITE back to memory, and finally a VERIFY.
void mvk_Disable_GDO_0 ( unsigned char  device_slot)

Disables the GD0_0 function on the indicated CC2500 device.

The function will disable the GD0_0 function on the specified CC2500 part.

Parameters:
[in]device_slotMAVRK slot occupied by the given device (MAVRK_AFE1 - MAVRK_AFE4)
Returns:
None
void mvk_Disable_GDO_0_CC_Radio ( unsigned char  device_slot)
unsigned char mvk_Enable_Address_Check ( unsigned char  device_slot,
unsigned char  mode 
)

Enable an Address Byte to be used to filter the payload to data intended for the node Advantages: Radio maintains Rx Mode unless packet is intended for the device which requires less interaction with the host processor. Disadvantages: Uses 1 payload Byte. Use case: Most applications with small payloads and small STAR or point to point networks.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
[in]modeAddress Check mode (NO_ADDRESS_CHECK, ADDRESS_CHECK_NO_BROADCAST, ADDRESS_CHECK_0x00_BROADCAST,
ADDRESS_CHECK_0x00_BROADCAST_0xFF_BROADCAST)
Returns:
CC_RADIO_SET_SUCCESSFULL - By default this message is set to be successful
CC_RADIO_SET_VERIFY_ERROR - but will be overwrittend by the part was programmed but the register verifacation failed
Note:
This function was originally set by the SmartRF Studio initialization. Since there are several registers bits untouched, we do a READ of the register, followed by a MODIFY of the target register, followed by a WRITE back to memory, and finally a VERIFY.
unsigned char mvk_Enable_Append_Status ( unsigned char  device_slot)

Enables the Append Status Register allowing a snapshot of the received packets RSSI and LST to be incapsulated in the packet Advantages: Quickly able to assess intermittent nodes with packet errors without having to continuously monitoring the packet. Disadvantages: Uses two bytes in the Payload. Use case: Most small payload applications. Radio Diversity applications.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
Returns:
CC_RADIO_SET_SUCCESSFULL - By default this message is set to be successful
CC_RADIO_SET_VERIFY_ERROR - but will be overwrittend by the part was programmed but the register verifacation failed
Note:
This function was originally set by the SmartRF Studio initialization. Since there are several registers bits untouched, we do a READ of the register, followed by a MODIFY of the target register, followed by a WRITE back to memory, and finally a VERIFY.
void mvk_Enable_Frequency_Synth ( unsigned char  device_slot)

Enables the internal frequency synthesizer in the radio Advantages: Saves blanking interval time due to oscillator calibration and PLL Stabilization. Disadvantages: Uses more power Use case: Streaming applications. Applications with very short sleep intervals.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
Returns:
None
void mvk_Enable_GDO_0 ( unsigned char  device_slot)

Enables the GD0_0 function on the indicated CC2500 device.

The function will enable the GD0_0 function on the specified CC2500 part.

Parameters:
[in]device_slotMAVRK slot occupied by the given device (MAVRK_AFE1 - MAVRK_AFE4)
Returns:
None
void mvk_Enable_GDO_0_CC_Radio ( unsigned char  device_slot)
unsigned char mvk_Enable_PLL_Calibration ( unsigned char  device_slot,
unsigned char  settings 
)

This settings enables automatic PLL calibration when changing to or from IDLE state.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
[in]settingsWhen to do the automatic PLL calibation
Returns:
CC_RADIO_SET_SUCCESSFULL - By default this message is set to be successful
CC_RADIO_SET_VERIFY_ERROR - but will be overwrittend by the part was programmed but the register verifacation failed
void mvk_Enable_Radio_Rx ( unsigned char  device_slot,
volatile CC_Device_Radio_Status_Flags_type CC_Device_Radio_Status_Flags 
)

Puts the radio in Receive mode.

Radio will remain is RX mode until either a packet is received that has: 1) Good CRC, 2) A matching address, 3) A number of received bytes equal to the fixed packet length or the variable packet byte (Payload byte 1) or if the code forces a TX or IDLE mode.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
[in]CC_Device_Radio_Status_FlagsPointer to the Radio flags attached to the device slot. Used to signal the radio has been put in a Receive mode
Returns:
None
unsigned char mvk_Enable_Radio_Tx ( unsigned char  device_slot,
volatile CC_Device_Radio_Status_Flags_type CC_Device_Radio_Status_Flags 
)

Puts the radio in Transmit mode.

Radio will remain is TX mode until the contents are transmitted from the FIFO followed by the CRC, or 1) Not enough bytes were in the TX FIFO (underflow condition) as set by the fixed packet length or 2) The variable packet byte (1st byte in the payload)

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
[in]CC_Device_Radio_Status_FlagsPointer to the Radio flags attached to the device slot. Used to signal the radio has been put in a Transmit mode
Returns:
TRANSMIT_SUCCESSFUL Transmission was successful
TRANSMIT_UNSUCCESSFUL Transmission was unsuccessful
void mvk_Flush_Rx_Fifo ( unsigned char  device_slot)

Perform a Flush of the Rx FIFO.

This function clears the FIFOs usually caused by an error in the loading of the Tx or a reading of the Rx

This is a sequential function and that interacts with the CC_SPI_Functions which are polling.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
Returns:
NONE
void mvk_Flush_RX_TX_Buffers ( unsigned char  device_slot,
volatile CC_Device_Radio_Status_Flags_type CC_Device_Radio_Status_Flags,
unsigned char  error_level 
)

The function clears the RX FIFO. Usually called on an error packet.

The function resets the Radio to a receive mode and flushes the RX FIFO. It can also be trapped permanently by a Critical Error Level

Parameters:
[in]device_slotDevice Slot of the Radio being reset
[in]CC_Device_Radio_Status_FlagsFlags used to monitor the state of the Radio being reset
[in]error_levelError level sent to the error trap
Returns:
None
void mvk_Flush_Tx_Fifo ( unsigned char  device_slot)

Perform a Flush of the Tx FIFO.

This function clears the FIFOs usually caused by an error in the loading of the Tx or a reading of the Rx

This is a sequential function and that interacts with the CC_SPI_Functions which are polling.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
Returns:
NONE
unsigned char mvk_Get_Current_Radio_Status ( unsigned char  device_slot)

Gets the current radio state.

Parameters:
[in]device_slotThe slot that the radio is in
Returns:
IDLE_STATE
RX_STATE
TX_STATE
FREQUENCY_SYNTHESIZER_ON
CALIBRATE
PLL_SETTLING
RX_FIFO_OVERFLOW
TX_FIFO_UNDERFLOW
volatile CC_Device_Radio_Status_Flags_type* mvk_Get_Radio_Status_Flags ( unsigned char  device_slot)

Returns the radio status flags of the radio in the passed device slot.

Parameters:
[in]device_slotThe device slot that the radio is in
Returns:
CC_Device_Radio_Status_Flags_type *
void mvk_Idle_Radio ( unsigned char  device_slot,
volatile CC_Device_Radio_Status_Flags_type CC_Device_Radio_Status_Flags 
)

Puts the radio in IDLE mode, the device is neither transmitting or receiving Advantages: Saves power compared to Rx Mode. Disadvantages: Uses more power than sleep mode. Use case: Clearing the FIFO's, Moving the Radio from RX to TX states.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
[in]CC_Device_Radio_Status_FlagsPointer to the Radio flags attached to the device slot. Used to signal the radio has been put in an IDLE mode
Returns:
None
void mvk_Init_CC_Device_Via_Constant_Table ( unsigned char  device_slot,
unsigned char *  constant_pointer,
unsigned char  table_size 
)

Perform a Address/Value programming of the TI CC Radio's with a constants table generated by Smart RF Studio.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
[in]constant_pointerPointer to the data to write to the Radio
[in]table_sizeNumber of address and register values to write
Returns:
none
Note:
This function programs the addresses and registers from SmartRF studio generated CCXXXX_constants.c
void mvk_Init_CC_Device_Via_Constant_Table_Extended ( unsigned char  device_slot,
unsigned int *  constant_pointer,
unsigned int  table_size 
)

Perform a Address/Value programming of the TI CC Radio's with a constants table generated by Smart RF Studio This function can handle extended register assignment (present in radio devices such as CC1120).

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
[in]constant_pointerPointer to the data to write to the Radio
[in]table_sizeNumber of address and register values to write
Returns:
none
Note:
This function programs the addresses and registers from SmartRF studio generated CCXXXX_constants.c
unsigned char mvk_Init_CC_Radio ( unsigned char  device_slot,
volatile CC_Device_Radio_Status_Flags_type CC_Device_Radio_Status_Flags 
)

Perform a search of the part number and revision number of the device in the RF slot followed by an initialization of the registers in the device.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
[in]CC_Device_Radio_Status_FlagsPointer to the Radio flags attached to the device slot. Used to signal the radio has been put in an IDLE State
Returns:
CC_RADIO_INIT_SUCCESSFUL - By default this message is set, but will be overwritten by:
CC2500 - CC2500 part number and revision match found
CC2550 - CC2500 part number and revision match found
CC1100 - CC1100 part number and revision match found
CC1101 - CC2500 part number and revision match found
CC430F5137_RADIO - CC430F5137 part number and revision match found
CC_RADIO_INIT_VERIFY_ERROR - or The part was programmed but the register verifacation failed
NO_CC_RADIO_FOUND - During the search none of the target radios were found in the slot
Note:
This function utilizes a series of address + values generated by Smart RF studio with a export template of Constants_Table.srfexp Smart RF studio can be downloaded off of www.ti.com. Constants_Table.sfrexp can be found in the same directory as this file.
void mvk_Init_CC_SPI_CS_IO ( unsigned char  device_slot)

Initializes the GPIO and Chip Select pins for the ChipCon RF slots on the MAVRK boards.

The function will initialize the GPIO and Chip Select pins for the ChipCon RF slots on the MAVRK boards. Current logic configures all RF slots, not just the RF slot indicated by the input parameter.

Parameters:
[in]device_slotMAVRK slot occupied by the given device (MAVRK_RF1 - MAVRK_RF4) (Not used by the function)

void mvk_Init_CC_SPI_CS_IO (unsigned char device_slot)

unsigned char mvk_Init_GDO_0 ( unsigned char  device_slot,
unsigned char  function 
)

Initializes GDO_0 on the indicated CC2500 device.

The function will initialize GDO_0 to the indicated function for the specified CC2500 part.

Parameters:
[in]device_slotMAVRK slot occupied by the given device (MAVRK_AFE1 - MAVRK_AFE4)
[in]functionRX_FIFO_THRESHOLD, RX_FIFO_THRESHOLD_PACKET_COMPLETE, TX_FIFO_THRESHOLD, TX_FIFO_FULL
RX_FIFO_OVERFLOW, TX_FIFO_OVERFLOW, SYNC_WORD_SENT_RECEIVED, CRC_OK_PACKET_RECEIVED, PREAMBLE_QUALITY_REACHED
CLEAR_CHANNEL_ASSESSMENT, PLL_LOCKED, SERIAL_CLOCK_OUTPUT, SERIAL_DATA_OUTPUT, SERIAL_TRANSPARENT_DATA_OUT,
CARRIER_SENSED, CRC_OK, RX_HARD_DATA_0, RX_HARD_DATA_1, POWER_AMP_ENABLE, LNA_ENABLE,
WAKE_ON_RADIO_EVENT_0, WAKE_ON_RADIO_EVENT_1, CHIP_READY, XOSC_STABLE, SERIAL_TX_DATA, HI_Z, PULLED_LOW,
CLOCK_OSCILLATOR, CLOCK_OSCILLATOR_DIVIDED_BY_1_5, CLOCK_OSCILLATOR_DIVIDED_BY_2, CLOCK_OSCILLATOR_DIVIDED_BY_3,
CLOCK_OSCILLATOR_DIVIDED_BY_4, CLOCK_OSCILLATOR_DIVIDED_BY_6, CLOCK_OSCILLATOR_DIVIDED_BY_8, CLOCK_OSCILLATOR_DIVIDED_BY_12,
CLOCK_OSCILLATOR_DIVIDED_BY_16, CLOCK_OSCILLATOR_DIVIDED_BY_24, CLOCK_OSCILLATOR_DIVIDED_BY_32, CLOCK_OSCILLATOR_DIVIDED_BY_48,
CLOCK_OSCILLATOR_DIVIDED_BY_64, CLOCK_OSCILLATOR_DIVIDED_BY_96, CLOCK_OSCILLATOR_DIVIDED_BY_128, CLOCK_OSCILLATOR_DIVIDED_BY_192
Returns:
CC_RADIO_INIT_SUCCESSFUL Initialization successful
CC_RADIO_INIT_VERIFY_ERROR Initialization failed
unsigned char mvk_Init_GDO_2 ( unsigned char  device_slot,
unsigned char  function 
)

Initializes GD0_2 on the indicated CC2500 device.

The function will initialize GD0_2 to the indicated function for the specified CC2500 part.

Parameters:
[in]device_slotMAVRK slot occupied by the given device (MAVRK_AFE1 - MAVRK_AFE4)
[in]functionRX_FIFO_THRESHOLD, RX_FIFO_THRESHOLD_PACKET_COMPLETE, TX_FIFO_THRESHOLD, TX_FIFO_FULL
RX_FIFO_OVERFLOW, TX_FIFO_OVERFLOW, SYNC_WORD_SENT_RECEIVED, CRC_OK_PACKET_RECEIVED, PREAMBLE_QUALITY_REACHED
CLEAR_CHANNEL_ASSESSMENT, PLL_LOCKED, SERIAL_CLOCK_OUTPUT, SERIAL_DATA_OUTPUT, SERIAL_TRANSPARENT_DATA_OUT,
CARRIER_SENSED, CRC_OK, RX_HARD_DATA_0, RX_HARD_DATA_1, POWER_AMP_ENABLE, LNA_ENABLE,
WAKE_ON_RADIO_EVENT_0, WAKE_ON_RADIO_EVENT_1, CHIP_READY, XOSC_STABLE, SERIAL_TX_DATA, HI_Z, PULLED_LOW,
CLOCK_OSCILLATOR, CLOCK_OSCILLATOR_DIVIDED_BY_1_5, CLOCK_OSCILLATOR_DIVIDED_BY_2, CLOCK_OSCILLATOR_DIVIDED_BY_3,
CLOCK_OSCILLATOR_DIVIDED_BY_4, CLOCK_OSCILLATOR_DIVIDED_BY_6, CLOCK_OSCILLATOR_DIVIDED_BY_8, CLOCK_OSCILLATOR_DIVIDED_BY_12,
CLOCK_OSCILLATOR_DIVIDED_BY_16, CLOCK_OSCILLATOR_DIVIDED_BY_24, CLOCK_OSCILLATOR_DIVIDED_BY_32, CLOCK_OSCILLATOR_DIVIDED_BY_48,
CLOCK_OSCILLATOR_DIVIDED_BY_64, CLOCK_OSCILLATOR_DIVIDED_BY_96, CLOCK_OSCILLATOR_DIVIDED_BY_128, CLOCK_OSCILLATOR_DIVIDED_BY_192
Returns:
CC_RADIO_INIT_SUCCESSFUL Initialization successful
CC_RADIO_INIT_VERIFY_ERROR Initialization failed
unsigned char mvk_Init_GDO_CC_Radio ( unsigned char  device_slot)
void mvk_Init_MAVRK_RF_Device_Slot_for_CC_Radios ( unsigned char  device_slot)
void mvk_Initialize_Receive_Radio ( unsigned char  device_slot)

Routine used to initialize the CC radio in a receive mode.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
Returns:
NONE

Note: If radio initialization is successful, the Radio is placed in Receive mode

void mvk_Initialize_Transceiver_Radio ( unsigned char  device_slot)

Routine used to initialize the CC radio in a transmit and receive mode.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
Returns:
NONE

Note: If radio initialization is successful, the Radio is placed in Receive mode

void mvk_Initialize_Transmit_Radio ( unsigned char  device_slot)

Routine used to initialize the CC radio in a transmit mode.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
Returns:
NONE

Note: If the radio initialization is successful, the packet_complete flag is set, signalling the radio is ready to transmit

unsigned char mvk_POR_CC_Device ( unsigned char  device_slot)

Forces a reset to the indicated CC2500 device.

The function will drive a reset signal to the indicated device slot intended for a CC2500 part.

Parameters:
[in]device_slotMAVRK slot occupied by the given device (MAVRK_AFE1 - MAVRK_AFE4)
Returns:
None
unsigned char mvk_POR_CC_Device_CC_Radio ( unsigned char  device_slot)
void mvk_Power_Down_Radio ( unsigned char  device_slot)

Places the Radio in its lowest power setting.

Advantages: Extreme power savings. Disadvantages: Radio is not receiving packets so network synchronization is necessary. Blanking interval while the PLL wakes up and stabilizes. Use case: Very low power applications done by network experienced designers

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
Returns:
None
unsigned char mvk_Power_Down_Radio_CC_Radio ( unsigned char  device_slot,
volatile CC_Device_Radio_Status_Flags_type CC_Device_Radio_Status_Flags 
)
unsigned char mvk_Process_Radio_Packet ( unsigned char  device_slot,
unsigned char  pin_level 
)

Used by the user_ISR to process the incomeing packet.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
[in]pin_levelPin level of the ISR interrupted pin
Returns:
CC_RADIO_PACKET_PROCESS_SUCCESS CC_RADIO_SLOT_ERROR - Slot that was passed was not initialized for a radio
unsigned char mvk_Read_Burst_CC_Radio ( unsigned char  device_slot,
unsigned char  read_mode,
unsigned char  radio_register_address,
unsigned char  cs_gate 
)
void mvk_Read_Current_PLL_Setting ( unsigned char  device_slot)

Reads the PLL Register on the TI CC Radio.

This function reads the PLL Register. It is for Test Only. It is stored in the Global Variable Current_PLL_Setting.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
Returns:
None
unsigned char mvk_Read_Extended_CC_Radio ( unsigned char  device_slot,
unsigned char  read_mode,
unsigned int  radio_extended_address 
)

Writes a command and a address register to a CC1120 (or similar) type of radios. Then writes the data.

This command is not supported on the CC430F5137.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
[in]read_modeRead mode
[in]radio_extended_addressThe extended address of the register that is intended to be reached
Returns:
unsigned char The data that was read from the device register
void mvk_Read_Frequency_Offset ( unsigned char  device_slot)

Reads the Frequency Offset Register on the TI CC Radio.

This function reads the Frequency Offset Register and can be used to note drift in the Radio's Frequency Synthesizer. It is stored in the Global Variable Frequency_Offset_Estimate.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
Returns:
None
void mvk_Read_FSCAL1 ( unsigned char  device_slot)
void mvk_Read_Link_Quality ( unsigned char  device_slot)

Reads the Link Quality Register on the TI CC Radio.

This function reads the Link Quality Register and can be used to note in band or near band interference of the radio transmitting to this device. It is stored in the Global Variable Received_Signal_Strength.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
Returns:
None
void mvk_Read_MARC_State ( unsigned char  device_slot)

Reads the MARC state of the TI CC Radio.

This function reads MARC State of the TI CC Radio which provides more info on the status of the device than the CC Status. The value is stored in the Global Variable Main_Radio_Control_State_Machine_Status.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
Returns:
None
void mvk_Read_Packet_Status ( unsigned char  device_slot)

Reads the Packet state of the TI CC Radio.

This function reads the Packet Status register and returns information on Carrier Sense, Clear Channel Assess, Synch Word Received. It is stored in the Global Variable Packet_Status.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
Returns:
None
Note:
: Continually monitoring this register via SPI port will greatly reduce the sensitivity of the radio and is not recommended.
void mvk_Read_PTEST ( unsigned char  device_slot)

Reads the PLL Register on the TI CC Radio.

This function reads the PTEST Register. It is for Test Only. It is stored in the Global Variable

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
Returns:
None
void mvk_Read_RC_Oscillator_Calibration_Result ( unsigned char  device_slot)

Reads the PLL Register on the TI CC Radio.

This function reads the PLL Register. It is AN047. It is stored in the Global Variable Last_RC_Oscillator_Calibration_Result_0 & Last_RC_Oscillator_Calibration_Result_1.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
Returns:
None
unsigned char mvk_Read_Receive_FIFO ( unsigned char  device_slot,
char *  Rx_Pointer,
volatile CC_Device_Radio_Status_Flags_type CC_Device_Radio_Status_Flags 
)

Perform a Read operation from the Receive FIFO on the TI CC Radios.

This function reads the CC Radio RX FIFO and into a passed pointer. The number of bytes in the payload is the 1st element of the array. It is part of the Radio Receive Algorithm

This is a sequential function and that interacts with the CC_SPI_Functions which are polling.

Payload is: Payload_Size + Destination_Address + Slave Address + Payload (up to 59 bytes) + LQI + RSSI

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
[in]Rx_PointerPointer to the data read from the FIFO
[in]CC_Device_Radio_Status_FlagsPointer to the Radio flags attached to the device slot. Used to signal the radio has been put in an IDLE State
Returns:
CC_RADIO_RX_FIFO_SUCCESSFUL - Message successfully read from the FIFO
CC_RADIO_RX_VARIABLE_PACKET_ERROR - Message length in the payload was too long
CC_RADIO_RX_PACKET_SIZE_MISMATCH - Message length did not match the number of bytes in the Rx FIFO
CC_RADIO_RX_ADDRESS_MISMATCH - Address was not OWN ADDRESS or 0x00 or 0xFF
CC_RADIO_RX_OWN_ADDRESS_RX - Address received matched the address in This_Device_s_Address
CC_RADIO_RX_BROADCAST_ADDRESS_RX - Address received was 0x00
CC_RADIO_RX_DHCP_ADDRESS_RX - Address received was 0xFF
CC_RADIO_RX_FIFO_OVERFLOW - Rx Buffer still had data in it after the num_read_bytes was read
Note:
This function utilizes a variable payload and enables the address byte and the status bytes. The function utilizes one FIFO only, making the payload size 59 or less. This_Device_s_Address (by default set to OWN_ADDRESS) is used as the Source Address.
void mvk_Read_RSSI ( unsigned char  device_slot)

Reads the Received Signal Strength Register on the TI CC Radio.

This function reads the Received Signal Strength Register and can be used to note range of the radio transmitting to this device. It is stored in the Global Variable Received_Signal_Strength.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
Returns:
None
unsigned char mvk_Read_Rx_FIFO_Status ( unsigned char  device_slot)

Read the levels of the Transmit/Receive Buffers.

This function sends reads the buffer levels and returns it to the calling routine

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
Returns:
FIFO level of the requested buffer (TX/RX)
unsigned char mvk_Read_Single_CC_Radio ( unsigned char  device_slot,
unsigned char  read_mode,
unsigned char  radio_register_address 
)
void mvk_Read_Status ( unsigned char  device_slot)

Read the status of the TI CC radio. Writing the Status gives info on the Tx Buffer. Reading the Status gives info on the Rx Buffer.

This function sends a NOP Command and gets back the radio's status register. Any command gets the status register, the NOP ensures nothing is modified in the process. The Status is update in the Global Variable CC_Device_Chip_Status.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
Returns:
None
unsigned char mvk_Read_Tx_FIFO_Status ( unsigned char  device_slot)

Read the levels of the Transmit/Receive Buffers.

This function sends reads the buffer levels and returns it to the calling routine

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
Returns:
FIFO level of the requested buffer (TX/RX)
unsigned char mvk_Read_Version_and_Part_Number_CC_Radio ( unsigned char  device_slot)

Reads the version and part number of the TI Chipcon radio. Used in the discovery process of the RF Slot.

This function reads the part number and revision number of the device which is used primarily in the initial discovery and programming of the registers in init_CC_Device.c. Both values are stored in the Global Registers CC_Part_Number and CC_Version_Number.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
Returns:
Radio found CC2500, CC2550, CC1100, CC1101, CC430F5137_RADIO or NO_CC_RADIO_FOUND
void mvk_Read_Wake_On_Radio_Time ( unsigned char  device_slot)

Reads the Time on the Wake on Radio Timer.

This function reads Wake on Radio timer and stores the value on the Global Variable Wake_On_Radio_Time_Low_Byte and Wake_On_Radio_Time_High_Byte

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
Returns:
None
void mvk_Reset_GDO_0_Interrupt_Edge ( unsigned char  device_slot)

Resets the pin edge interrupt used by the GD0_0 function on the indicated CC2500 device.

The function will place the interrupt edge to Low to High used by the GDO function on the packet received state

Parameters:
[in]device_slotMAVRK slot occupied by the given device (MAVRK_AFE1 - MAVRK_AFE4)
Returns:
None
void mvk_Reset_Radio ( unsigned char  device_slot)

Performs a software reset on the radio.

All values in the TI CC Radio are at their data sheet default states

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
Returns:
None
void mvk_Reset_Radio_Timeout ( unsigned char  device_slot)

Performs a software reset on the radio.

All values in the TI CC Radio are at their data sheet default states This function with timeout is useful for detecting if the current settings for the radio are the correct ones If timeout configuration was incorrect

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
Returns:
None
unsigned char mvk_Restore_GDO_0_Function ( unsigned char  device_slot)

Restores the previously saved function of the GDO_0 interrupt to be restored later.

The function will restore the global GDO_0_Function_Context saved by the mvk_Save_GDO_0_Context

Parameters:
[in]device_slotMAVRK slot occupied by the given device (MAVRK_AFE1 - MAVRK_AFE4)
Returns:
None
unsigned char mvk_Restore_GDO_2_Function ( unsigned char  device_slot)

Restores the previously saved function of the GDO_2 interrupt to be restored later.

The function will restore the global GDO_2_Function_Context saved by the mvk_Save_GDO_2_Context

Parameters:
[in]device_slotMAVRK slot occupied by the given device (MAVRK_AFE1 - MAVRK_AFE4)
Returns:
None
void mvk_Save_GDO_0_Function ( unsigned char  device_slot)

Saves the current function of the GDO_0 interrupt to be restored later.

The function will read the current GDO_0 function of the Chipcon radio and save it. It can be restored later by using the global GDO_0_Function_Context and the mvk_Restor_GDO_0_Context

Parameters:
[in]device_slotMAVRK slot occupied by the given device (MAVRK_AFE1 - MAVRK_AFE4)
Returns:
None
void mvk_Save_GDO_2_Function ( unsigned char  device_slot)

Saves the current function of the GDO_2 interrupt to be restored later.

The function will read the current GDO_2 function of the Chipcon radio and save it. It can be restored later by using the global GDO_2_Function_Context and the mvk_Restor_GDO_2_Context

Parameters:
[in]device_slotMAVRK slot occupied by the given device (MAVRK_AFE1 - MAVRK_AFE4)
Returns:
None
unsigned char mvk_Send_Command_Strobe_CC_Radio ( unsigned char  device_slot,
unsigned char  radio_register_address 
)
void mvk_Set_Default_Radio_Settings ( unsigned char  device_slot)

Sets some default radio settings.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
Returns:
None
unsigned char mvk_Set_Device_Slave_Address ( unsigned char  device_slot,
unsigned char  address 
)

Set's this devices address for use in Address checking by mvk_Enable_Address_Check.

In some instances this may be changed from OWN_ADDRESS. Typically this is done with a Master assignind an Address. To support this use case the global variable This_Device_s_Address is used. This variable is automatically updated in the routine.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
[in]addressDesired Address this device will use as its own
Returns:
CC_RADIO_SET_SUCCESSFULL - By default this message is set to be successful
CC_RADIO_SET_VERIFY_ERROR - but will be overwrittend by the part was programmed but the register verifacation failed
Note:
This function was originally set by the SmartRF Studio initialization. Since there are several registers bits untouched, we do a READ of the register, followed by a MODIFY of the target register, followed by a WRITE back to memory, and finally a VERIFY.
unsigned char mvk_Set_Diversity_Antenna ( unsigned char  device_slot,
unsigned char  antenna 
)

Sets the Diversity Antenna.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
[in]antennaWhich antenna to select
Returns:
NONE
unsigned char mvk_Set_GDO_0_Function ( unsigned char  device_slot,
unsigned char  function 
)

Configures the function for GD0_0 on the indicated Radio device.

The function will configure the GD0_0 to the indicated function for the specified Radio part.

Parameters:
[in]device_slotMAVRK slot occupied by the given device (MAVRK_AFE1 - MAVRK_AFE4)
[in]functionRX_FIFO_THRESHOLD, RX_FIFO_THRESHOLD_PACKET_COMPLETE, TX_FIFO_THRESHOLD, TX_FIFO_FULL
RX_FIFO_OVERFLOW, TX_FIFO_OVERFLOW, SYNC_WORD_SENT_RECEIVED, CRC_OK_PACKET_RECEIVED, PREAMBLE_QUALITY_REACHED
CLEAR_CHANNEL_ASSESSMENT, PLL_LOCKED, SERIAL_CLOCK_OUTPUT, SERIAL_DATA_OUTPUT, SERIAL_TRANSPARENT_DATA_OUT,
CARRIER_SENSED, CRC_OK, RX_HARD_DATA_0, RX_HARD_DATA_1, POWER_AMP_ENABLE, LNA_ENABLE,
WAKE_ON_RADIO_EVENT_0, WAKE_ON_RADIO_EVENT_1, CHIP_READY, XOSC_STABLE, SERIAL_TX_DATA, HI_Z, PULLED_LOW,
CLOCK_OSCILLATOR, CLOCK_OSCILLATOR_DIVIDED_BY_1_5, CLOCK_OSCILLATOR_DIVIDED_BY_2, CLOCK_OSCILLATOR_DIVIDED_BY_3,
CLOCK_OSCILLATOR_DIVIDED_BY_4, CLOCK_OSCILLATOR_DIVIDED_BY_6, CLOCK_OSCILLATOR_DIVIDED_BY_8, CLOCK_OSCILLATOR_DIVIDED_BY_12,
CLOCK_OSCILLATOR_DIVIDED_BY_16, CLOCK_OSCILLATOR_DIVIDED_BY_24, CLOCK_OSCILLATOR_DIVIDED_BY_32, CLOCK_OSCILLATOR_DIVIDED_BY_48,
CLOCK_OSCILLATOR_DIVIDED_BY_64, CLOCK_OSCILLATOR_DIVIDED_BY_96, CLOCK_OSCILLATOR_DIVIDED_BY_128, CLOCK_OSCILLATOR_DIVIDED_BY_192
Returns:
CC_RADIO_INIT_SUCCESSFUL Configuration successful
CC_RADIO_INIT_VERIFY_ERROR Configuration failed
unsigned char mvk_Set_GDO_2_Function ( unsigned char  device_slot,
unsigned char  function 
)

Configures the function for GD0_2 on the indicated CC2500 device.

The function will configure the GD0_2 to the indicated function for the specified CC2500 part.

Parameters:
[in]device_slotMAVRK slot occupied by the given device (MAVRK_AFE1 - MAVRK_AFE4)
[in]functionRX_FIFO_THRESHOLD, RX_FIFO_THRESHOLD_PACKET_COMPLETE, TX_FIFO_THRESHOLD, TX_FIFO_FULL
RX_FIFO_OVERFLOW, TX_FIFO_OVERFLOW, SYNC_WORD_SENT_RECEIVED, CRC_OK_PACKET_RECEIVED, PREAMBLE_QUALITY_REACHED
CLEAR_CHANNEL_ASSESSMENT, PLL_LOCKED, SERIAL_CLOCK_OUTPUT, SERIAL_DATA_OUTPUT, SERIAL_TRANSPARENT_DATA_OUT,
CARRIER_SENSED, CRC_OK, RX_HARD_DATA_0, RX_HARD_DATA_1, POWER_AMP_ENABLE, LNA_ENABLE,
WAKE_ON_RADIO_EVENT_0, WAKE_ON_RADIO_EVENT_1, CHIP_READY, XOSC_STABLE, SERIAL_TX_DATA, HI_Z, PULLED_LOW,
CLOCK_OSCILLATOR, CLOCK_OSCILLATOR_DIVIDED_BY_1_5, CLOCK_OSCILLATOR_DIVIDED_BY_2, CLOCK_OSCILLATOR_DIVIDED_BY_3,
CLOCK_OSCILLATOR_DIVIDED_BY_4, CLOCK_OSCILLATOR_DIVIDED_BY_6, CLOCK_OSCILLATOR_DIVIDED_BY_8, CLOCK_OSCILLATOR_DIVIDED_BY_12,
CLOCK_OSCILLATOR_DIVIDED_BY_16, CLOCK_OSCILLATOR_DIVIDED_BY_24, CLOCK_OSCILLATOR_DIVIDED_BY_32, CLOCK_OSCILLATOR_DIVIDED_BY_48,
CLOCK_OSCILLATOR_DIVIDED_BY_64, CLOCK_OSCILLATOR_DIVIDED_BY_96, CLOCK_OSCILLATOR_DIVIDED_BY_128, CLOCK_OSCILLATOR_DIVIDED_BY_192
Returns:
CC_RADIO_INIT_SUCCESSFUL Configuration successful
CC_RADIO_INIT_VERIFY_ERROR Configuration failed
void mvk_Set_GDO_Function_Flags ( unsigned char  device_slot,
unsigned char  function 
)

This routine sets the flags used by the Pin ISRs to signal what function the interrupt is signalling.

The function will configure the GD0_0 to the indicated function for the specified Radio part.

Parameters:
[in]functionSYNC_WORD_SENT_RECEIVED = PACKET_SENT_RECEIVED
PLL_LOCKED = PLL_LOCKED_CHECK
All other settings = OTHER_RADIO_FUNCTION
[in]device_slotDevice slot utilizing the GDO
Returns:
None

Note: If more needs to be added in the future, we can extend the char in the definition to an int

void mvk_Set_Idle_Mode ( unsigned char  device_slot)

Function sets up the radio for idle mode.

Parameters:
[in]device_slotThe slot that the radio is in
Returns:
None
unsigned char mvk_Set_Mode_After_Rx_Complete ( unsigned char  device_slot,
unsigned char  mode 
)

This function defines what mode the radio goes into after a packet is received.

Advantages: Rx to Tx with a couple of bytes in the TX FIFO does an autoACK. Rx to Rx ensures the next packet is read in a streaming application Disadvantages: Power useage is higher than returning to IDLE. Rx to Rx needs to quickly read the FIFO before it is overwritten. Use case: Streaming TX applications. Applications that Acknowledge Payload Transmissions.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
[in]modeSelects one of the 4 modes this device can do after a RX'd packet MODE_RETURNS_TO_IDLE, FS_TX_ON, STAY_IN_RX, MODE_TX
Returns:
CC_RADIO_SET_SUCCESSFULL - By default this message is set to be successful
CC_RADIO_SET_VERIFY_ERROR - but will be overwrittend by the part was programmed but the register verifacation failed
Note:
This function was originally set by the SmartRF Studio initialization. Since there are several registers bits untouched, we do a READ of the register, followed by a MODIFY of the target register, followed by a WRITE back to memory, and finally a VERIFY.
unsigned char mvk_Set_Mode_After_Tx_Complete ( unsigned char  device_slot,
unsigned char  mode 
)

This function defines what mode the radio goes into after a packet is transmitted.

Advantages: TX to TX allows for multiple FIFO transmits to occur quickly. TX to RX ensures a pickup of an AutoAck. Disadvantages: Power useage is higher than returning to IDLE. TX to TX needs to ensure the TX FIFO is filled enough to prevent an underflow. Use case: Streaming TX applications. Applications that Acknowledge Payload Transmissions.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
[in]modeSelects one of the 4 modes this device can do after a TX'd packet MODE_RETURNS_TO_IDLE, FS_TX_ON, STAY_IN_TX, MODE_RX
Returns:
CC_RADIO_SET_SUCCESSFULL - By default this message is set to be successful
CC_RADIO_SET_VERIFY_ERROR - but will be overwrittend by the part was programmed but the register verifacation failed
Note:
This function was originally set by the SmartRF Studio initialization. Since there are several registers bits untouched, we do a READ of the register, followed by a MODIFY of the target register, followed by a WRITE back to memory, and finally a VERIFY.
unsigned char mvk_Set_Mode_After_TX_RX_to_IDLE ( unsigned char  device_slot)

This function sets the Radio to go into IDLE mode after a successful Transmit or Receive.

Advantages: RX buffer is not overwritten in RX mode and TX Buffer doesn't underflow in TX. Disadvantages: If a transmitted message is sent immediately after RX or TX (AutoAck for example), it will probably be missed. Use case: Infrequent transmissions and reception applications (once a minute for example)

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
Returns:
CC_RADIO_SET_SUCCESSFULL - By default this message is set to be successful
CC_RADIO_SET_VERIFY_ERROR - but will be overwrittend by the part was programmed but the register verifacation failed
Note:
This function was originally set by the SmartRF Studio initialization. Since there are several registers bits untouched, we do a READ of the register, followed by a MODIFY of the target register, followed by a WRITE back to memory, and finally a VERIFY.
unsigned char mvk_Set_PA_Output_Level ( unsigned char  device_slot,
unsigned char  power_table_pointer 
)

This function points to the 8 positions on the PA Table. Commonly used to scale the output power of the radio to save power and to control near radio interference.

This routine checks for boundaries of the table 0 through 7.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
[in]power_table_pointerThis points to the table entry that we want to use for our Radio Power Setting
Returns:
CC_RADIO_SET_SUCCESSFULL - By default this message is set to be successful
CC_RADIO_SET_VERIFY_ERROR - but will be overwrittend by the part was programmed but the register verifacation failed
CC_PA_POINTER_SET_OVER_TABLE_SIZE - Signals the calling routine that the pointer value is out of range (common if the routine is trying to set the actual PA value in this routine)
Note:
This function was originally set by the SmartRF Studio initialization. Since there are several registers bits untouched, we do a READ of the register, followed by a MODIFY of the target register, followed by a WRITE back to memory, and finally a VERIFY.
unsigned char mvk_Set_PA_Table ( unsigned char  device_slot,
unsigned char *  power_table 
)

This function points to the 8 positions on the PA Table. Commonly used to scale the output power of the radio to save power and to control near radio interference.

This routine checks for boundaries of the table 0 through 7.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
[in]power_tableThis pointer signifies the array of values we are programming into the table, it should be 8 bytes
Returns:
CC_RADIO_SET_SUCCESSFULL - By default this message is set to be successful
CC_RADIO_SET_VERIFY_ERROR - but will be overwrittend by the part was programmed but the register verifacation failed
Note:
This function was originally set by the SmartRF Studio initialization. Since there are several registers bits untouched, we do a READ of the register, followed by a MODIFY of the target register, followed by a WRITE back to memory, and finally a VERIFY.
unsigned char mvk_Set_PA_Table_Multiple_Values ( unsigned char  device_slot,
unsigned char *  power_number 
)

This updates the entire PA Table with a single value. Mainly used for the initialization of the entire table with a max or min value of the application.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
[in]power_numberPower setting which is commonly generated by Smart RF studio or can be found in the cc_radio.h file
Returns:
CC_RADIO_SET_SUCCESSFULL - By default this message is set to be successful
CC_RADIO_SET_VERIFY_ERROR - but will be overwrittend by the part was programmed but the register verifacation failed
Note:
This function was originally set by the SmartRF Studio initialization. Since there are several registers bits untouched, we do a READ of the register, followed by a MODIFY of the target register, followed by a WRITE back to memory, and finally a VERIFY.
unsigned char mvk_Set_PA_Table_Single_Value ( unsigned char  device_slot,
unsigned char  power_number 
)

This updates the entire PA Table with a single value. Mainly used for the initialization of the entire table with a max or min value of the application.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
[in]power_numberPower setting which is commonly generated by Smart RF studio or can be found in the cc_radio.h file
Returns:
CC_RADIO_SET_SUCCESSFULL - By default this message is set to be successful
CC_RADIO_SET_VERIFY_ERROR - but will be overwrittend by the part was programmed but the register verifacation failed
Note:
This function was originally set by the SmartRF Studio initialization. Since there are several registers bits untouched, we do a READ of the register, followed by a MODIFY of the target register, followed by a WRITE back to memory, and finally a VERIFY.
unsigned char mvk_Set_Packet_Length ( unsigned char  device_slot,
unsigned char  packet_size 
)

Sets the Packet Length Register on TI CC Radio as well as setting the Packet Mode to Fixed. Advantages: Saves one byte in the payload. Disadvantages: Always have to seen a full packet. Use case: Streaming applications.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
[in]packet_sizeDesired size of the Entire Data Packet (the routine adds a byte for Destination/Source Address and Size)
Returns:
CC_RADIO_SET_SUCCESSFULL - By default this message is set to be successful
CC_RADIO_SET_VERIFY_ERROR - but will be overwrittend by the part was programmed but the register verifacation failed
Note:
This function was originally set by the SmartRF Studio initialization. Since there are several registers bits untouched, we do a READ of the register, followed by a MODIFY of the target register, followed by a WRITE back to memory, and finally a VERIFY.
void mvk_Set_Packet_Receive_Timer ( unsigned char  radio_data_rate,
unsigned char  radio_payload_size 
)

Calculate the Packet Time for a Transmit or a Receive of the Chipcon Radio using the provided data rate.

The function will perform a determine the apporximate number of cycles in a delay loop to delay the indicated number of ms. and sets the Timer A0 to the appropriate setting.

Parameters:
[in]radio_data_rateData rate of the radio transmit and receive (needs multiplied by 1000 to get bits/s
[in]radio_payload_sizePayload size in Bytes of the tranmitted and received packet. If variable, assume max packet size
Returns:
None
void mvk_Set_Power_CC112X_2442_Radio ( unsigned char  device_slot,
unsigned char  set 
)

Function powers the PA on the CC1120-2442.

Parameters:
[in]device_slotThe slot that the radio is in
[in]setRF_x_GPIO_2 signal logic value (HIGH, LOW) to be set for input to the specified slot
Returns:
None
void mvk_Set_Radio_Mode_Registers ( unsigned char  mode,
unsigned  device_slot 
)

Allows settings different radio modes.

Parameters:
[in]modeRadio modes (RX_NORMAL, TX_NORMAL, TX_UNMODULATED, or TX_RANDOM)
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
Returns:
None
void mvk_Set_Radio_Power_Level ( unsigned char  device_slot,
signed char  power_level 
)

Sets the radio power level.

The power_level parameter should be in dBm and have to be signed

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
[in]power_levelPower level in dBm
void mvk_Set_Receive_Mode ( unsigned char  device_slot)

Function sets up the radio for receive mode.

Parameters:
[in]device_slotThe slot that the radio is in
Returns:
None
void mvk_Set_RX_TX_CC112X_2442_Radio ( unsigned char  device_slot,
unsigned char  set 
)

Function sets up power amplifier in the CC1120-2442.

Parameters:
[in]device_slotThe slot that the radio is in
[in]setRF_x_GPIO_2 signal logic value (HIGH, LOW) to be set for input to the specified slot
Returns:
None
void mvk_Set_Transmit_Mode ( unsigned char  device_slot)

Function sets up teh radio for transmit mode.

Parameters:
[in]device_slotThe slot that the radio is in
Returns:
None
unsigned char mvk_Set_Variable_Length ( unsigned char  device_slot)

Sets the payload length to variable. Advantages: Do not have to Pad the TX data saving power and packet errors. Disadvantages: Lose a byte of the payload. Use case: Most general applications with small payloads.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
Returns:
CC_RADIO_SET_SUCCESSFULL - By default this message is set to be successful
CC_RADIO_SET_VERIFY_ERROR - but will be overwrittend by the part was programmed but the register verifacation failed
Note:
This function was originally set by the SmartRF Studio initialization. Since there are several registers bits untouched, we do a READ of the register, followed by a MODIFY of the target register, followed by a WRITE back to memory, and finally a VERIFY.
void mvk_Sync_Word_High ( )

Starts the frequency hopping timer if gated by a open request.

For Star device uses internal timer to send out beacons. Timer started on init. Node device uses the high going GDO0 interrupt to synchronize on a start of packet recieve. It only does this when it is expecting a Beacon (after ACK from Star), if the packet it receives is not a beacon the flag is reset to wait again for the beacon.

Returns:
None

Starts the frequency hopping timer if gated by a open request.

Returns:
None
void mvk_Sync_Word_Rx_Tx_GDO_Function ( unsigned char  pin_level,
unsigned char  device_slot,
volatile CC_Device_Radio_Status_Flags_type CC_Device_Radio_Status_Flags 
)

CC Device Sync Word Rx/TX Routine.

The function controls the sync word logic for the GDO pins on the CC2500 part.

Parameters:
[in]pin_levelStart or stop the Sync Word protocol for the CC2500 device
LOW - Stop packet timer
HIGH - Sync Word Transmitted Received, start packet timer
[in]device_slotMAVRK slot occupied by the given device (MAVRK_AFE1 - MAVRK_AFE4)
[in]CC_Device_Radio_Status_FlagsPointer to the Radio flags attached to the device slot.
Returns:
None
void mvk_Toggle_Receive_Diversity_Antenna ( void  )

Switches the Diversity Antenna.

Returns:
NONE
void mvk_Toggle_Transmit_Diversity_Antenna ( void  )

Switches the Diversity Antenna.

Returns:
NONE
void mvk_update_Radio_Packet_Time ( unsigned char  reset_timer)

updates the Packet Time count and checks for a timed out packet

The function performs the increment and comparison of timed events to show if the packet was lost

Parameters:
[in]reset_timerIf set this will reset the count. Used by the mvk_Stop_Packet_Timer function to show a successful reception
Note:
This function sets the time it should take for a radio transmission or reception. Mainly used for PER tests where a receive will eventually fail. On the expiration of the timer, the radio is reset to a receive mode and the packet FIFO is cleared. This signals a partial packet was received and then interrupted. Resetting the packet synchronizes the payload length and address expected by the receiving radio.
unsigned char mvk_Verify_CC_Device_Registers ( unsigned char  device_slot,
unsigned char *  constant_pointer,
unsigned char  table_size 
)

Perform a read comparison in Address/Value format programmed by mvk_Init_CC_Radio.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
[in]constant_pointerPointer to the data to write to the Radio
[in]table_sizeNumber of address and register values to write
Returns:
CC_RADIO_INIT_SUCCESSFUL - Default setting signifying the radio was successfull programmed
CC_RADIO_INIT_VERIFY_ERROR - Signifies the radio was setting was not verified
Note:
This function programs the addresses and registers from SmartRF studio generated CCXXXX_constants.c
unsigned char mvk_Verify_CC_Device_Registers_Extended ( unsigned char  device_slot,
unsigned int *  constant_pointer,
unsigned int  table_size 
)

Perform a read comparison in Address/Value format programmed by mvk_Init_CC_Radio.

To be used with CC1120 and similar type radio devices

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
[in]constant_pointerPointer to the data to write to the Radio
[in]table_sizeNumber of address and register values to write
Returns:
CC_RADIO_INIT_SUCCESSFUL - Default setting signifying the radio was successfull programmed
CC_RADIO_INIT_VERIFY_ERROR - Signifies the radio was setting was not verified
Note:
This function programs the addresses and registers from SmartRF studio generated CCXXXX_constants.c
unsigned char mvk_Wait_Clear_To_Transmit ( )

Waits until it is possible to transmit using the radio.

Returns:
MAVRK_POSITIVE It is possible to transmit
MAVRK_NEGATIVE It is not possible to transmit, timeout
void mvk_Wake_Radio ( unsigned char  device_slot,
volatile CC_Device_Radio_Status_Flags_type CC_Device_Radio_Status_Flags 
)

Wakes the Radio and places it in the IDLE state.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
[in]CC_Device_Radio_Status_FlagsPointer to the Radio flags attached to the device slot. Used to signal the radio has been put in an IDLE State
Returns:
None
void mvk_Write_Burst_CC_Radio ( unsigned char  device_slot,
unsigned char  write_mode,
unsigned char  radio_register_address,
unsigned char  radio_write_data,
unsigned char  cs_gate 
)
unsigned char mvk_Write_Extended_CC_Radio ( unsigned char  device_slot,
unsigned char  write_mode,
unsigned int  radio_extended_address,
unsigned char  radio_write_data 
)

Writes a command and a address register to a CC1120 (or similar) type of radios. Then writes the data.

This command is not supported on the CC430F5137.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
[in]write_modeWrite mode
[in]radio_extended_addressThe extended address of the register that is intended to be reached
[in]radio_write_dataThe data to the register that is intended to be written
Returns:
None
unsigned char mvk_Write_Single_CC_Radio ( unsigned char  device_slot,
unsigned char  write_mode,
unsigned char  radio_register_address,
unsigned char  radio_write_data 
)
void mvk_Write_Status ( unsigned char  device_slot)

Read the status of the TI CC radio. Writing the Status gives info on the Tx Buffer. Reading the Status gives info on the Rx Buffer.

This function sends a NOP Command and gets back the radio's status register. Any command gets the status register, the NOP ensures nothing is modified in the process. The Status is update in the Global Variable CC_Device_Chip_Status.

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
Returns:
None
unsigned char mvk_Write_To_Transmit_FIFO ( unsigned char  device_slot,
char *  string,
unsigned char  num_write_bytes,
unsigned char  slave_address,
volatile CC_Device_Radio_Status_Flags_type CC_Device_Radio_Status_Flags 
)

Perform a write operation to the Transmit FIFO on the TI CC Radios.

This function sends a passed number of bytes to the CC Radio's Transmit Buffer. It is part of the Radio Transmission Algorithm

This is a sequential function and that interacts with the CC_SPI_Functions which are polling.

Payload is: Payload_Size + Destination_Address + Slave Address + Payload (up to 59 bytes) + LQI + RSSI

Parameters:
[in]device_slotLocation of the CC Radio on the MAVRK Motherboard
[in]stringPointer to the data to write to the FIFO
[in]num_write_bytesNumber of data bytes to write
[in]slave_addressDestination address of the Payload in the FIFO
[in]CC_Device_Radio_Status_FlagsPointer to the Radio flags attached to the device slot. Used to signal the radio has been put in an IDLE State
Returns:
CC_RADIO_TX_FIFO_SUCCESSFUL - Message successfully sent to the FIFO
CC_RADIO_STRING_TRUNCATED - Message length was too long
CC_RADIO_TX_BUFFER_NOT_EMPTY - Previous Message was too long
CC_RADIO_TX_BUFFER_UNDERFLOW - Not enough bytes sent to the FIFO
Note:
This function utilizes a variable payload and enables the address byte and the status bytes. The function utilizes one FIFO only, making the payload size 59 or less. This_Device_s_Address (by default set to OWN_ADDRESS) is used as the Source Address.

Variable Documentation

volatile unsigned char Bytes_in_Rx_FIFO
volatile unsigned char Bytes_in_Tx_FIFO
const unsigned char CC1100_radio_table[70]
unsigned char CC1101_PA_Ramping[8]
const unsigned char CC1101_radio_table[70]
const unsigned int CC1120_radio_table[340]
unsigned long int CC112X_Freq_Base
unsigned long int CC112X_Freq_Max
unsigned long int CC112X_Freq_Mult
const unsigned char CC2500_radio_table[70]
const unsigned char CC2550_radio_table[50]
const unsigned char CC430F5137_radio_table[70]
unsigned char CC5137_PA_Ramping[8]
volatile unsigned char CC_Device_Chip_Status
unsigned char CC_Part_Number
unsigned char CC_Version_Number
volatile unsigned char Current_PLL_Setting
const unsigned char Frequency_Hopping_List[]
volatile unsigned char Frequency_Offset_Estimate
volatile unsigned char Frequency_Synth_Calibration_Result
volatile unsigned char Frequency_Synth_Calibration_Result_0
volatile unsigned char Frequency_Synth_Calibration_Result_1
volatile unsigned char Frequency_Synth_Calibration_Result_2
volatile unsigned char GDO_0_Function_Context
volatile unsigned char GDO_2_Function_Context
volatile unsigned char Link_Quality_CRC_Status
volatile unsigned char Main_Radio_Control_State_Machine
volatile unsigned char Main_Radio_State_Machine_1
const unsigned char Number_Of_Channels
volatile unsigned char Packet_Automation_Control_0
volatile unsigned char Packet_Automation_Control_1
volatile unsigned char Packet_Status
volatile unsigned char PTEST_Setting
unsigned char Radio_runt_packet
unsigned char Receive_Radio_Slot
volatile signed char Received_Signal_Strength
volatile Rx_FIFO_type* Rx_FIFO
volatile unsigned char This_Device_s_Address
unsigned char This_Device_s_Channel
unsigned char Transceiver_Radio_Slot
unsigned char Transmit_Radio_Slot
volatile Tx_FIFO_type* Tx_FIFO
volatile unsigned char Tx_Front_End_Configuration
volatile unsigned char Wake_On_Radio_Time_High_Byte
volatile unsigned char Wake_On_Radio_Time_Low_Byte
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines