Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of stm-spirit1-rf-driver by
Functions | |
uint8_t | SpiritRadioInit (SRadioInit *pxSRadioInitStruct) |
Initializes the SPIRIT analog and digital radio part according to the specified parameters in the pxSRadioInitStruct. | |
void | SpiritRadioGetInfo (SRadioInit *pxSRadioInitStruct) |
Returns the SPIRIT analog and digital radio structure according to the registers value. | |
void | SpiritRadioSetXtalFlag (XtalFlag xXtal) |
Sets the Xtal configuration in the ANA_FUNC_CONF0 register. | |
XtalFlag | SpiritRadioGetXtalFlag (void) |
Returns the Xtal configuration in the ANA_FUNC_CONF0 register. | |
uint8_t | SpiritRadioSearchWCP (uint32_t lFc) |
Returns the charge pump word for a given VCO frequency. | |
uint32_t | SpiritRadioGetSynthWord (void) |
Returns the synth word. | |
void | SpiritRadioSetSynthWord (uint32_t lSynthWord) |
Sets the SYNTH registers. | |
void | SpiritRadioSetBand (BandSelect xBand) |
Sets the operating band. | |
BandSelect | SpiritRadioGetBand (void) |
Returns the operating band. | |
void | SpiritRadioSetChannel (uint8_t cChannel) |
Sets the channel number. | |
uint8_t | SpiritRadioGetChannel (void) |
Returns the actual channel number. | |
void | SpiritRadioSetChannelSpace (uint32_t fChannelSpace) |
Sets the channel space factor in channel space register. | |
uint32_t | SpiritRadioGetChannelSpace (void) |
Returns the channel space register. | |
void | SpiritRadioSetFrequencyOffsetPpm (int16_t nXtalPpm) |
Sets the FC OFFSET register starting from xtal ppm value. | |
void | SpiritRadioSetFrequencyOffset (int32_t lFOffset) |
Sets the FC OFFSET register starting from frequency offset expressed in Hz. | |
int32_t | SpiritRadioGetFrequencyOffset (void) |
Returns the actual frequency offset. | |
uint8_t | SpiritRadioSetFrequencyBase (uint32_t lFBase) |
Sets the Synth word and the Band Select register according to desired base carrier frequency. | |
void | SpiritRadioVcoCalibrationWAFB (SpiritFunctionalState xNewstate) |
To say to the set frequency base if do or not the VCO calibration WA. | |
uint32_t | SpiritRadioGetFrequencyBase (void) |
Returns the base carrier frequency. | |
uint32_t | SpiritRadioGetCenterFrequency (void) |
Returns the actual channel center frequency. | |
void | SpiritRadioSearchDatarateME (uint32_t lDatarate, uint8_t *pcM, uint8_t *pcE) |
Returns the mantissa and exponent, whose value used in the datarate formula will give the datarate value closer to the given datarate. | |
void | SpiritRadioSearchChannelBwME (uint32_t lBandwidth, uint8_t *pcM, uint8_t *pcE) |
Returns the mantissa and exponent for a given bandwidth. | |
void | SpiritRadioSearchFreqDevME (uint32_t lFDev, uint8_t *pcM, uint8_t *pcE) |
Returns the mantissa and exponent, whose value used in the frequency deviation formula will give a frequency deviation value most closer to the given frequency deviation. | |
void | SpiritRadioSetDatarate (uint32_t lDatarate) |
Sets the datarate. | |
uint32_t | SpiritRadioGetDatarate (void) |
Returns the datarate. | |
void | SpiritRadioSetFrequencyDev (uint32_t lFDev) |
Sets the frequency deviation. | |
uint32_t | SpiritRadioGetFrequencyDev (void) |
Returns the frequency deviation. | |
void | SpiritRadioSetChannelBW (uint32_t lBandwidth) |
Sets the channel filter bandwidth. | |
uint32_t | SpiritRadioGetChannelBW (void) |
Returns the channel filter bandwidth. | |
void | SpiritRadioSetModulation (ModulationSelect xModulation) |
Sets the modulation type. | |
ModulationSelect | SpiritRadioGetModulation (void) |
Returns the modulation type used. | |
void | SpiritRadioCWTransmitMode (SpiritFunctionalState xNewState) |
Enables or Disables the Continuous Wave transmit mode. | |
void | SpiritRadioSetOokPeakDecay (OokPeakDecay xOokDecay) |
Sets the OOK Peak Decay. | |
OokPeakDecay | SpiritRadioGetOokPeakDecay (void) |
Returns the OOK Peak Decay. | |
uint8_t | SpiritRadioGetdBm2Reg (uint32_t lFBase, float fPowerdBm) |
Returns the PA register value that corresponds to the passed dBm power. | |
float | SpiritRadioGetReg2dBm (uint32_t lFBase, uint8_t cPowerReg) |
Returns the dBm power that corresponds to the value of PA register. | |
void | SpiritRadioSetPATabledBm (uint8_t cPALevelMaxIndex, uint8_t cWidth, PALoadCapacitor xCLoad, float *pfPAtabledBm) |
Configures the Power Amplifier Table and registers with value expressed in dBm. | |
void | SpiritRadioGetPATabledBm (uint8_t *pcPALevelMaxIndex, float *pfPAtabledBm) |
Returns the Power Amplifier Table and registers, returning values in dBm. | |
void | SpiritRadioSetPALeveldBm (uint8_t cIndex, float fPowerdBm) |
Sets a specific PA_LEVEL register, with a value given in dBm. | |
float | SpiritRadioGetPALeveldBm (uint8_t cIndex) |
Returns a specific PA_LEVEL register, returning a value in dBm. | |
void | SpiritRadioSetPATable (uint8_t cPALevelMaxIndex, uint8_t cWidth, PALoadCapacitor xCLoad, uint8_t *pcPAtable) |
Configures the Power Amplifier Table and registers. | |
void | SpiritRadioGetPATable (uint8_t *pcPALevelMaxIndex, uint8_t *pcPAtable) |
Returns the Power Amplifier Table and registers. | |
void | SpiritRadioSetPALevel (uint8_t cIndex, uint8_t cPower) |
Sets a specific PA_LEVEL register. | |
uint8_t | SpiritRadioGetPALevel (uint8_t cIndex) |
Returns a specific PA_LEVEL register. | |
void | SpiritRadioSetPACwc (PALoadCapacitor xCLoad) |
Sets the output stage additional load capacitor bank. | |
PALoadCapacitor | SpiritRadioGetPACwc (void) |
Returns the output stage additional load capacitor bank. | |
void | SpiritRadioSetPALevelMaxIndex (uint8_t cIndex) |
Sets a specific PA_LEVEL_MAX_INDEX. | |
uint8_t | SpiritRadioGetPALevelMaxIndex (void) |
Returns the actual PA_LEVEL_MAX_INDEX. | |
void | SpiritRadioSetPAStepWidth (uint8_t cWidth) |
Sets a specific PA_RAMP_STEP_WIDTH. | |
uint8_t | SpiritRadioGetPAStepWidth (void) |
Returns the actual PA_RAMP_STEP_WIDTH. | |
void | SpiritRadioPARamping (SpiritFunctionalState xNewState) |
Enables or Disables the Power Ramping. | |
SpiritFunctionalState | SpiritRadioGetPARamping (void) |
Returns the Power Ramping enable bit. | |
void | SpiritRadioAFC (SpiritFunctionalState xNewState) |
Enables or Disables the AFC. | |
void | SpiritRadioAFCFreezeOnSync (SpiritFunctionalState xNewState) |
Enables or Disables the AFC freeze on sync word detection. | |
void | SpiritRadioSetAFCMode (AFCMode xMode) |
Sets the AFC working mode. | |
AFCMode | SpiritRadioGetAFCMode (void) |
Returns the AFC working mode. | |
void | SpiritRadioSetAFCPDLeakage (uint8_t cLeakage) |
Sets the AFC peak detector leakage. | |
uint8_t | SpiritRadioGetAFCPDLeakage (void) |
Returns the AFC peak detector leakage. | |
void | SpiritRadioSetAFCFastPeriod (uint8_t cLength) |
Sets the length of the AFC fast period expressed as number of samples. | |
uint8_t | SpiritRadioGetAFCFastPeriod (void) |
Returns the AFC fast period expressed as number of samples. | |
void | SpiritRadioSetAFCFastGain (uint8_t cGain) |
Sets the AFC loop gain in fast mode. | |
uint8_t | SpiritRadioGetAFCFastGain (void) |
Returns the AFC loop gain in fast mode. | |
void | SpiritRadioSetAFCSlowGain (uint8_t cGain) |
Sets the AFC loop gain in slow mode. | |
uint8_t | SpiritRadioGetAFCSlowGain (void) |
Returns the AFC loop gain in slow mode. | |
int8_t | SpiritRadioGetAFCCorrectionReg (void) |
Returns the AFC correction from the corresponding register. | |
int32_t | SpiritRadioGetAFCCorrectionHz (void) |
Returns the AFC correction expressed in Hz. | |
void | SpiritRadioAGC (SpiritFunctionalState xNewState) |
Enables or Disables the AGC. | |
void | SpiritRadioSetAGCMode (AGCMode xMode) |
Sets the AGC working mode. | |
AGCMode | SpiritRadioGetAGCMode (void) |
Returns the AGC working mode. | |
void | SpiritRadioAGCFreezeOnSteady (SpiritFunctionalState xNewState) |
Enables or Disables the AGC freeze on steady state. | |
void | SpiritRadioAGCFreezeOnSync (SpiritFunctionalState xNewState) |
Enable or Disable the AGC freeze on sync detection. | |
void | SpiritRadioAGCStartMaxAttenuation (SpiritFunctionalState xNewState) |
Enable or Disable the AGC to start with max attenuation. | |
void | SpiritRadioSetAGCMeasureTimeUs (uint16_t nTime) |
Sets the AGC measure time. | |
uint16_t | SpiritRadioGetAGCMeasureTimeUs (void) |
Returns the AGC measure time. | |
void | SpiritRadioSetAGCMeasureTime (uint8_t cTime) |
Sets the AGC measure time. | |
uint8_t | SpiritRadioGetAGCMeasureTime (void) |
Returns the AGC measure time. | |
void | SpiritRadioSetAGCHoldTimeUs (uint8_t cTime) |
Sets the AGC hold time. | |
uint8_t | SpiritRadioGetAGCHoldTimeUs (void) |
Returns the AGC hold time. | |
void | SpiritRadioSetAGCHoldTime (uint8_t cTime) |
Sets the AGC hold time. | |
uint8_t | SpiritRadioGetAGCHoldTime (void) |
Returns the AGC hold time. | |
void | SpiritRadioSetAGCHighThreshold (uint8_t cHighThreshold) |
Sets the AGC high threshold. | |
uint8_t | SpiritRadioGetAGCHighThreshold (void) |
Returns the AGC high threshold. | |
void | SpiritRadioSetAGCLowThreshold (uint8_t cLowThreshold) |
Sets the AGC low threshold. | |
uint8_t | SpiritRadioGetAGCLowThreshold (void) |
Returns the AGC low threshold. | |
void | SpiritRadioSetClkRecMode (ClkRecMode xMode) |
Sets the clock recovery algorithm. | |
ClkRecMode | SpiritRadioGetClkRecMode (void) |
Returns the Clock Recovery working mode. | |
void | SpiritRadioSetClkRecPGain (uint8_t cPGain) |
Sets the clock recovery proportional gain. | |
uint8_t | SpiritRadioGetClkRecPGain (void) |
Returns the log2 of the clock recovery proportional gain. | |
void | SpiritRadioSetClkRecIGain (uint8_t cIGain) |
Sets the clock recovery integral gain. | |
uint8_t | SpiritRadioGetClkRecIGain (void) |
Returns the clock recovery integral gain. | |
void | SpiritRadioSetClkRecPstFltLength (PstFltLength xLength) |
Sets the postfilter length for clock recovery algorithm. | |
PstFltLength | SpiritRadioGetClkRecPstFltLength (void) |
Returns the postfilter length for clock recovery algorithm. | |
void | SpiritRadioCsBlanking (SpiritFunctionalState xNewState) |
Enables or Disables the received data blanking when the CS is under the threshold. | |
void | SpiritRadioPersistenRx (SpiritFunctionalState xNewState) |
Enables or Disables the persistent RX mode. | |
void | SpiritRadioSetRefDiv (SpiritFunctionalState xNewState) |
Enables or Disables the synthesizer reference divider. | |
SpiritFunctionalState | SpiritRadioGetRefDiv (void) |
Get the the synthesizer reference divider state. | |
void | SpiritRadioSetDigDiv (SpiritFunctionalState xNewState) |
Enables or Disables the synthesizer reference divider. | |
SpiritFunctionalState | SpiritRadioGetDigDiv (void) |
Get the the synthesizer reference divider state. | |
uint32_t | SpiritRadioGetXtalFrequency (void) |
Returns the XTAL frequency. | |
void | SpiritRadioSetXtalFrequency (uint32_t lXtalFrequency) |
Sets the XTAL frequency. |
Function Documentation
void SpiritRadioAFC | ( | SpiritFunctionalState | xNewState ) |
Enables or Disables the AFC.
- Parameters:
-
xNewState new state for AFC. This parameter can be: S_ENABLE or S_DISABLE.
- Return values:
-
None.
Definition at line 2072 of file SPIRIT_Radio.c.
void SpiritRadioAFCFreezeOnSync | ( | SpiritFunctionalState | xNewState ) |
Enables or Disables the AFC freeze on sync word detection.
- Parameters:
-
xNewState new state for AFC freeze on sync word detection. This parameter can be: S_ENABLE or S_DISABLE.
- Return values:
-
None.
Definition at line 2102 of file SPIRIT_Radio.c.
void SpiritRadioAGC | ( | SpiritFunctionalState | xNewState ) |
Enables or Disables the AGC.
- Parameters:
-
xNewState new state for AGC. This parameter can be: S_ENABLE or S_DISABLE
- Return values:
-
None.
Definition at line 2385 of file SPIRIT_Radio.c.
void SpiritRadioAGCFreezeOnSteady | ( | SpiritFunctionalState | xNewState ) |
Enables or Disables the AGC freeze on steady state.
- Parameters:
-
xNewState new state for AGC freeze on steady state. This parameter can be: S_ENABLE or S_DISABLE.
- Return values:
-
None.
Definition at line 2465 of file SPIRIT_Radio.c.
void SpiritRadioAGCFreezeOnSync | ( | SpiritFunctionalState | xNewState ) |
Enable or Disable the AGC freeze on sync detection.
- Parameters:
-
xNewState new state for AGC freeze on sync detection. This parameter can be: S_ENABLE or S_DISABLE.
- Return values:
-
None.
Definition at line 2495 of file SPIRIT_Radio.c.
void SpiritRadioAGCStartMaxAttenuation | ( | SpiritFunctionalState | xNewState ) |
Enable or Disable the AGC to start with max attenuation.
- Parameters:
-
xNewState new state for AGC start with max attenuation mode. This parameter can be: S_ENABLE or S_DISABLE.
- Return values:
-
None.
Definition at line 2525 of file SPIRIT_Radio.c.
void SpiritRadioCsBlanking | ( | SpiritFunctionalState | xNewState ) |
Enables or Disables the received data blanking when the CS is under the threshold.
- Parameters:
-
xNewState new state of this mode. This parameter can be: S_ENABLE or S_DISABLE .
- Return values:
-
None.
Definition at line 3014 of file SPIRIT_Radio.c.
void SpiritRadioCWTransmitMode | ( | SpiritFunctionalState | xNewState ) |
Enables or Disables the Continuous Wave transmit mode.
- Parameters:
-
xNewState new state for power ramping. This parameter can be: S_ENABLE or S_DISABLE .
- Return values:
-
None.
Definition at line 1458 of file SPIRIT_Radio.c.
int32_t SpiritRadioGetAFCCorrectionHz | ( | void | ) |
Returns the AFC correction expressed in Hz.
- Parameters:
-
None.
- Return values:
-
int32_t AFC correction expressed in Hz according to the following formula: - Fafc[Hz]= (Fdig/(12*2^10))*AFC_CORR where
- AFC_CORR is the value read in the AFC_CORR register
Definition at line 2360 of file SPIRIT_Radio.c.
int8_t SpiritRadioGetAFCCorrectionReg | ( | void | ) |
Returns the AFC correction from the corresponding register.
- Parameters:
-
None.
- Return values:
-
int8_t AFC correction, read from the corresponding register. This parameter will be in the range [-128:127].
Definition at line 2340 of file SPIRIT_Radio.c.
uint8_t SpiritRadioGetAFCFastGain | ( | void | ) |
Returns the AFC loop gain in fast mode.
- Parameters:
-
None.
- Return values:
-
uint8_t AFC loop gain in fast mode. This parameter will be in the range: [0:15].
Definition at line 2280 of file SPIRIT_Radio.c.
uint8_t SpiritRadioGetAFCFastPeriod | ( | void | ) |
Returns the AFC fast period expressed as number of samples.
- Parameters:
-
None.
- Return values:
-
uint8_t Length of the fast period in number of samples.
Definition at line 2238 of file SPIRIT_Radio.c.
AFCMode SpiritRadioGetAFCMode | ( | void | ) |
Returns the AFC working mode.
- Parameters:
-
None.
- Return values:
-
AFCMode Settled AFC mode. This parameter will be one of the values defined in AFCMode : - AFC_SLICER_CORRECTION AFC loop closed on slicer
- AFC_2ND_IF_CORRECTION AFC loop closed on 2nd conversion stage
Definition at line 2164 of file SPIRIT_Radio.c.
uint8_t SpiritRadioGetAFCPDLeakage | ( | void | ) |
Returns the AFC peak detector leakage.
- Parameters:
-
None.
- Return values:
-
uint8_t Peak detector leakage value. This parameter will be in the range: [0:31].
Definition at line 2207 of file SPIRIT_Radio.c.
uint8_t SpiritRadioGetAFCSlowGain | ( | void | ) |
Returns the AFC loop gain in slow mode.
- Parameters:
-
None.
- Return values:
-
uint8_t AFC loop gain in slow mode. This parameter will be in the range: [0:15].
Definition at line 2322 of file SPIRIT_Radio.c.
uint8_t SpiritRadioGetAGCHighThreshold | ( | void | ) |
Returns the AGC high threshold.
- Parameters:
-
None.
- Return values:
-
uint8_t AGC high threshold read from the THRESHOLD_HIGH field of AGCCTRL_1 register. This parameter will be in the range [0:15].
Definition at line 2770 of file SPIRIT_Radio.c.
uint8_t SpiritRadioGetAGCHoldTime | ( | void | ) |
Returns the AGC hold time.
- Parameters:
-
None.
- Return values:
-
uint8_t AGC hold time read from the HOLD_TIME field of AGCCTRL_0 register. This parameter will be in the range [0:63].
Definition at line 2726 of file SPIRIT_Radio.c.
uint8_t SpiritRadioGetAGCHoldTimeUs | ( | void | ) |
Returns the AGC hold time.
- Parameters:
-
None.
- Return values:
-
uint8_t AGC hold time expressed in us. This parameter will be in the range: [0, 756/F_Xo].
Definition at line 2678 of file SPIRIT_Radio.c.
uint8_t SpiritRadioGetAGCLowThreshold | ( | void | ) |
Returns the AGC low threshold.
- Parameters:
-
None.
- Return values:
-
uint8_t AGC low threshold read from the THRESHOLD_LOW field of AGCCTRL_1 register. This parameter will be in the range [0:15].
Definition at line 2814 of file SPIRIT_Radio.c.
uint8_t SpiritRadioGetAGCMeasureTime | ( | void | ) |
Returns the AGC measure time.
- Parameters:
-
None.
- Return values:
-
uint8_t AGC measure time read from the MEAS_TIME field of AGCCTRL_2 register. This parameter will be in the range [0:15].
Definition at line 2631 of file SPIRIT_Radio.c.
uint16_t SpiritRadioGetAGCMeasureTimeUs | ( | void | ) |
Returns the AGC measure time.
- Parameters:
-
None.
- Return values:
-
uint16_t AGC measure time expressed in us. This parameter will be in the range [0, 393216/F_Xo].
Definition at line 2583 of file SPIRIT_Radio.c.
AGCMode SpiritRadioGetAGCMode | ( | void | ) |
Returns the AGC working mode.
- Parameters:
-
None.
- Return values:
-
AGCMode Settled AGC mode. This parameter can be one of the values defined in AGCMode : - AGC_LINEAR_MODE AGC works in linear mode
- AGC_BINARY_MODE AGC works in binary mode
Definition at line 2447 of file SPIRIT_Radio.c.
BandSelect SpiritRadioGetBand | ( | void | ) |
Returns the operating band.
- Parameters:
-
None.
- Return values:
-
BandSelect Settled band. This returned value can be one of the following parameters: - HIGH_BAND High_Band selected: from 779 MHz to 915 MHz
- MIDDLE_BAND: Middle Band selected: from 387 MHz to 470 MHz
- LOW_BAND: Low Band selected: from 300 MHz to 348 MHz
- VERY_LOW_BAND: Very low Band selected: from 150 MHz to 174 MHz
Definition at line 715 of file SPIRIT_Radio.c.
uint32_t SpiritRadioGetCenterFrequency | ( | void | ) |
Returns the actual channel center frequency.
- Parameters:
-
None.
- Return values:
-
uint32_t Actual channel center frequency expressed in Hz.
Definition at line 1061 of file SPIRIT_Radio.c.
uint8_t SpiritRadioGetChannel | ( | void | ) |
Returns the actual channel number.
- Parameters:
-
None.
- Return values:
-
uint8_t Actual channel number.
Definition at line 761 of file SPIRIT_Radio.c.
uint32_t SpiritRadioGetChannelBW | ( | void | ) |
Returns the channel filter bandwidth.
- Parameters:
-
None.
- Return values:
-
uint32_t Channel filter bandwidth expressed in Hz.
Definition at line 1393 of file SPIRIT_Radio.c.
uint32_t SpiritRadioGetChannelSpace | ( | void | ) |
Returns the channel space register.
- Parameters:
-
None.
- Return values:
-
uint32_t Channel space. The channel space is: CS = channel_space_factor x XtalFrequency/2^15 where channel_space_factor is the CHSPACE register value.
Definition at line 798 of file SPIRIT_Radio.c.
uint8_t SpiritRadioGetClkRecIGain | ( | void | ) |
Returns the clock recovery integral gain.
- Parameters:
-
None.
- Return values:
-
uint8_t Clock Recovery integral gain read from the CLK_REC_I_GAIN field of CLOCKREC register. This parameter will be in the range [0:15].
Definition at line 2950 of file SPIRIT_Radio.c.
ClkRecMode SpiritRadioGetClkRecMode | ( | void | ) |
Returns the Clock Recovery working mode.
- Parameters:
-
None.
- Return values:
-
ClkRecMode Clock Recovery mode. This parameter can be one of the values defined in ClkRecMode : - CLK_REC_PLL PLL alogrithm for clock recovery
- CLK_REC_DLL DLL alogrithm for clock recovery
Definition at line 2860 of file SPIRIT_Radio.c.
uint8_t SpiritRadioGetClkRecPGain | ( | void | ) |
Returns the log2 of the clock recovery proportional gain.
- Parameters:
-
None.
- Return values:
-
uint8_t Clock Recovery proportional gain read from the CLK_REC_P_GAIN field of CLOCKREC register. This parameter will be in the range [0:7].
Definition at line 2905 of file SPIRIT_Radio.c.
PstFltLength SpiritRadioGetClkRecPstFltLength | ( | void | ) |
Returns the postfilter length for clock recovery algorithm.
- Parameters:
-
None.
- Return values:
-
PstFltLength Postfilter length in symbols. This parameter can be one of the values defined in PstFltLength : - PSTFLT_LENGTH_8 Postfilter length is 8 symbols
- PSTFLT_LENGTH_16 Postfilter length is 16 symbols
Definition at line 2996 of file SPIRIT_Radio.c.
uint32_t SpiritRadioGetDatarate | ( | void | ) |
Returns the datarate.
- Parameters:
-
None.
- Return values:
-
uint32_t Settled datarate expressed in bps.
Definition at line 1288 of file SPIRIT_Radio.c.
uint8_t SpiritRadioGetdBm2Reg | ( | uint32_t | lFBase, |
float | fPowerdBm | ||
) |
Returns the PA register value that corresponds to the passed dBm power.
- Parameters:
-
lFbase Frequency base expressed in Hz. fPowerdBm Desired power in dBm.
- Return values:
-
Register value as byte.
- Note:
- The power interpolation curves used by this function have been extracted by measurements done on the divisional evaluation boards.
Definition at line 1533 of file SPIRIT_Radio.c.
SpiritFunctionalState SpiritRadioGetDigDiv | ( | void | ) |
Get the the synthesizer reference divider state.
- Parameters:
-
void.
- Return values:
-
None.
Definition at line 3177 of file SPIRIT_Radio.c.
uint32_t SpiritRadioGetFrequencyBase | ( | void | ) |
Returns the base carrier frequency.
- Parameters:
-
None.
- Return values:
-
uint32_t Base carrier frequency expressed in Hz as unsigned word.
Definition at line 1038 of file SPIRIT_Radio.c.
uint32_t SpiritRadioGetFrequencyDev | ( | void | ) |
Returns the frequency deviation.
- Parameters:
-
None.
- Return values:
-
uint32_t Frequency deviation value expressed in Hz. This value will be in the range [F_Xo*8/2^18, F_Xo*7680/2^18] Hz.
Definition at line 1338 of file SPIRIT_Radio.c.
int32_t SpiritRadioGetFrequencyOffset | ( | void | ) |
Returns the actual frequency offset.
- Parameters:
-
None.
- Return values:
-
int32_t Frequency offset expressed in Hz as signed word.
Definition at line 884 of file SPIRIT_Radio.c.
void SpiritRadioGetInfo | ( | SRadioInit * | pxSRadioInitStruct ) |
Returns the SPIRIT analog and digital radio structure according to the registers value.
- Parameters:
-
pxSRadioInitStruct pointer to a SRadioInit structure that contains the configuration information for the analog radio part of SPIRIT.
- Return values:
-
None.
Definition at line 423 of file SPIRIT_Radio.c.
ModulationSelect SpiritRadioGetModulation | ( | void | ) |
Returns the modulation type used.
- Parameters:
-
None.
- Return values:
-
ModulationSelect Settled modulation type.
Definition at line 1439 of file SPIRIT_Radio.c.
OokPeakDecay SpiritRadioGetOokPeakDecay | ( | void | ) |
Returns the OOK Peak Decay.
- Parameters:
-
None
- Return values:
-
OokPeakDecay Ook peak decay value.
Definition at line 1513 of file SPIRIT_Radio.c.
PALoadCapacitor SpiritRadioGetPACwc | ( | void | ) |
Returns the output stage additional load capacitor bank.
- Parameters:
-
None.
- Return values:
-
PALoadCapacitor Output stage additional load capacitor bank. This parameter can be: - LOAD_0_PF No additional PA load capacitor
- LOAD_1_2_PF 1.2pF additional PA load capacitor
- LOAD_2_4_PF 2.4pF additional PA load capacitor
- LOAD_3_6_PF 3.6pF additional PA load capacitor
Definition at line 1916 of file SPIRIT_Radio.c.
uint8_t SpiritRadioGetPALevel | ( | uint8_t | cIndex ) |
Returns a specific PA_LEVEL register.
- Parameters:
-
cIndex PA_LEVEL to read. This parameter shall be in the range [0:7].
- Return values:
-
uint8_t PA_LEVEL value. A value equal to zero implies no output power (output stage is in high impedance).
Definition at line 1860 of file SPIRIT_Radio.c.
float SpiritRadioGetPALeveldBm | ( | uint8_t | cIndex ) |
Returns a specific PA_LEVEL register, returning a value in dBm.
- Parameters:
-
cIndex PA_LEVEL to read. This parameter shall be in the range [0:7]
- Return values:
-
float Settled power level expressed in dBm. A value higher than PA_UPPER_LIMIT dBm implies no output power (output stage is in high impedance).
- Note:
- This function makes use of the SpiritRadioGetReg2dBm fcn to interpolate the power value.
Definition at line 1738 of file SPIRIT_Radio.c.
uint8_t SpiritRadioGetPALevelMaxIndex | ( | void | ) |
Returns the actual PA_LEVEL_MAX_INDEX.
- Parameters:
-
None.
- Return values:
-
uint8_t Actual PA_LEVEL_MAX_INDEX. This parameter will be in the range [0:7].
Definition at line 1959 of file SPIRIT_Radio.c.
SpiritFunctionalState SpiritRadioGetPARamping | ( | void | ) |
Returns the Power Ramping enable bit.
- Parameters:
-
xNewState new state for power ramping. This parameter can be: S_ENABLE or S_DISABLE.
- Return values:
-
None.
Definition at line 2053 of file SPIRIT_Radio.c.
uint8_t SpiritRadioGetPAStepWidth | ( | void | ) |
Returns the actual PA_RAMP_STEP_WIDTH.
- Parameters:
-
None.
- Return values:
-
uint8_t Step width value expressed in terms of bit period units Tb/8. This parameter will be in the range [1:4].
Definition at line 2004 of file SPIRIT_Radio.c.
void SpiritRadioGetPATable | ( | uint8_t * | pcPALevelMaxIndex, |
uint8_t * | pcPAtable | ||
) |
Returns the Power Amplifier Table and registers.
- Parameters:
-
pcPALevelMaxIndex pointer to the number of levels settled. This parameter shall be in the range [0:7]. pcPAtable pointer to an array of 8 elements containing the PA value. The first element will be the PA_LEVEL_0 and the last element will be PA_LEVEL_7. Any value equals to 0 implies that level has no output power (output stage is in high impedance).
- Return values:
-
None
Definition at line 1810 of file SPIRIT_Radio.c.
void SpiritRadioGetPATabledBm | ( | uint8_t * | pcPALevelMaxIndex, |
float * | pfPAtabledBm | ||
) |
Returns the Power Amplifier Table and registers, returning values in dBm.
- Parameters:
-
pcPALevelMaxIndex pointer to the number of levels settled. This parameter will be in the range [0:7]. pfPAtabledBm pointer to an array of 8 elements containing the PA value in dbm. The first element will be the PA_LEVEL_0 and the last element will be PA_LEVEL_7. Any value higher than PA_UPPER_LIMIT implies no output power (output stage is in high impedance).
- Return values:
-
None.
Definition at line 1675 of file SPIRIT_Radio.c.
SpiritFunctionalState SpiritRadioGetRefDiv | ( | void | ) |
Get the the synthesizer reference divider state.
- Parameters:
-
void.
- Return values:
-
None.
Definition at line 3106 of file SPIRIT_Radio.c.
float SpiritRadioGetReg2dBm | ( | uint32_t | lFBase, |
uint8_t | cPowerReg | ||
) |
Returns the dBm power that corresponds to the value of PA register.
- Parameters:
-
lFbase Frequency base expressed in Hz. cPowerReg Register value of the PA.
- Return values:
-
Power in dBm as float.
- Note:
- The power interpolation curves used by this function have been extracted by measurements done on the divisional evaluation boards.
Definition at line 1582 of file SPIRIT_Radio.c.
uint32_t SpiritRadioGetSynthWord | ( | void | ) |
Returns the synth word.
- Parameters:
-
None.
- Return values:
-
uint32_t Synth word.
Definition at line 635 of file SPIRIT_Radio.c.
XtalFlag SpiritRadioGetXtalFlag | ( | void | ) |
Returns the Xtal configuration in the ANA_FUNC_CONF0 register.
- Parameters:
-
None.
- Return values:
-
XtalFrequency Settled Xtal configuration.
Definition at line 558 of file SPIRIT_Radio.c.
uint32_t SpiritRadioGetXtalFrequency | ( | void | ) |
Returns the XTAL frequency.
- Parameters:
-
void.
- Return values:
-
uint32_t XTAL frequency.
Definition at line 3199 of file SPIRIT_Radio.c.
uint8_t SpiritRadioInit | ( | SRadioInit * | pxSRadioInitStruct ) |
Initializes the SPIRIT analog and digital radio part according to the specified parameters in the pxSRadioInitStruct.
- Parameters:
-
pxSRadioInitStruct pointer to a SRadioInit structure that contains the configuration information for the analog radio part of SPIRIT.
- Return values:
-
Error code: 0=no error, 1=error during calibration of VCO.
Definition at line 193 of file SPIRIT_Radio.c.
void SpiritRadioPARamping | ( | SpiritFunctionalState | xNewState ) |
Enables or Disables the Power Ramping.
- Parameters:
-
xNewState new state for power ramping. This parameter can be: S_ENABLE or S_DISABLE.
- Return values:
-
None.
Definition at line 2024 of file SPIRIT_Radio.c.
void SpiritRadioPersistenRx | ( | SpiritFunctionalState | xNewState ) |
Enables or Disables the persistent RX mode.
- Parameters:
-
xNewState new state of this mode. This parameter can be: S_ENABLE or S_DISABLE .
- Return values:
-
None.
Definition at line 3045 of file SPIRIT_Radio.c.
void SpiritRadioSearchChannelBwME | ( | uint32_t | lBandwidth, |
uint8_t * | pcM, | ||
uint8_t * | pcE | ||
) |
Returns the mantissa and exponent for a given bandwidth.
Even if it is possible to pass as parameter any value in the below mentioned range, the API will search the closer value according to a fixed table of channel bandwidth values (s_vectnBandwidth), as defined in the datasheet, returning the corresponding mantissa and exponent value.
- Parameters:
-
lBandwidth bandwidth expressed in Hz. This parameter ranging between 1100 and 800100. pcM pointer to the returned mantissa value. pcE pointer to the returned exponent value.
- Return values:
-
None.
Definition at line 1161 of file SPIRIT_Radio.c.
void SpiritRadioSearchDatarateME | ( | uint32_t | lDatarate, |
uint8_t * | pcM, | ||
uint8_t * | pcE | ||
) |
Returns the mantissa and exponent, whose value used in the datarate formula will give the datarate value closer to the given datarate.
- Parameters:
-
fDatarate datarate expressed in bps. This parameter ranging between 100 and 500000. pcM pointer to the returned mantissa value. pcE pointer to the returned exponent value.
- Return values:
-
None.
Definition at line 1094 of file SPIRIT_Radio.c.
void SpiritRadioSearchFreqDevME | ( | uint32_t | lFDev, |
uint8_t * | pcM, | ||
uint8_t * | pcE | ||
) |
Returns the mantissa and exponent, whose value used in the frequency deviation formula will give a frequency deviation value most closer to the given frequency deviation.
- Parameters:
-
fFDev frequency deviation expressed in Hz. This parameter can be a value in the range [F_Xo*8/2^18, F_Xo*7680/2^18]. pcM pointer to the returned mantissa value. pcE pointer to the returned exponent value.
- Return values:
-
None.
Definition at line 1222 of file SPIRIT_Radio.c.
uint8_t SpiritRadioSearchWCP | ( | uint32_t | lFc ) |
Returns the charge pump word for a given VCO frequency.
- Parameters:
-
lFc channel center frequency expressed in Hz. This parameter can be a value in one of the following ranges: - High_Band: from 779 MHz to 915 MHz
- Middle Band: from 387 MHz to 470 MHz
- Low Band: from 300 MHz to 348 MHz
- Very low Band: from 150 MHz to 174 MHz
- Return values:
-
uint8_t Charge pump word.
Definition at line 580 of file SPIRIT_Radio.c.
void SpiritRadioSetAFCFastGain | ( | uint8_t | cGain ) |
Sets the AFC loop gain in fast mode.
- Parameters:
-
cGain AFC loop gain in fast mode. This parameter shall be in the range: [0:15].
- Return values:
-
None.
Definition at line 2256 of file SPIRIT_Radio.c.
void SpiritRadioSetAFCFastPeriod | ( | uint8_t | cLength ) |
Sets the length of the AFC fast period expressed as number of samples.
- Parameters:
-
cLength length of the fast period in number of samples.
- Return values:
-
None.
Definition at line 2225 of file SPIRIT_Radio.c.
void SpiritRadioSetAFCMode | ( | AFCMode | xMode ) |
Sets the AFC working mode.
- Parameters:
-
xMode the AFC mode. This parameter can be one of the values defined in AFCMode : - AFC_SLICER_CORRECTION AFC loop closed on slicer
- AFC_2ND_IF_CORRECTION AFC loop closed on 2nd conversion stage
- Return values:
-
None.
Definition at line 2133 of file SPIRIT_Radio.c.
void SpiritRadioSetAFCPDLeakage | ( | uint8_t | cLeakage ) |
Sets the AFC peak detector leakage.
- Parameters:
-
cLeakage the peak detector leakage. This parameter shall be in the range: [0:31].
- Return values:
-
None.
Definition at line 2183 of file SPIRIT_Radio.c.
void SpiritRadioSetAFCSlowGain | ( | uint8_t | cGain ) |
Sets the AFC loop gain in slow mode.
- Parameters:
-
cGain AFC loop gain in slow mode. This parameter shall be in the range: [0:15].
- Return values:
-
None.
Definition at line 2298 of file SPIRIT_Radio.c.
void SpiritRadioSetAGCHighThreshold | ( | uint8_t | cHighThreshold ) |
Sets the AGC high threshold.
- Parameters:
-
cHighThreshold AGC high threshold to write in the THRESHOLD_HIGH field of AGCCTRL_1 register. This parameter shall be in the range [0:15].
- Return values:
-
None.
Definition at line 2744 of file SPIRIT_Radio.c.
void SpiritRadioSetAGCHoldTime | ( | uint8_t | cTime ) |
Sets the AGC hold time.
- Parameters:
-
cTime AGC hold time to write in the HOLD_TIME field of AGCCTRL_0 register. This parameter shall be in the range [0:63].
- Return values:
-
None.
Definition at line 2700 of file SPIRIT_Radio.c.
void SpiritRadioSetAGCHoldTimeUs | ( | uint8_t | cTime ) |
Sets the AGC hold time.
- Parameters:
-
cTime AGC hold time expressed in us. This parameter shall be in the range[0, 756/F_Xo].
- Return values:
-
None.
Definition at line 2648 of file SPIRIT_Radio.c.
void SpiritRadioSetAGCLowThreshold | ( | uint8_t | cLowThreshold ) |
Sets the AGC low threshold.
- Parameters:
-
cLowThreshold AGC low threshold to write in the THRESHOLD_LOW field of AGCCTRL_1 register. This parameter shall be in the range [0:15].
- Return values:
-
None.
Definition at line 2788 of file SPIRIT_Radio.c.
void SpiritRadioSetAGCMeasureTime | ( | uint8_t | cTime ) |
Sets the AGC measure time.
- Parameters:
-
cTime AGC measure time to write in the MEAS_TIME field of AGCCTRL_2 register. This parameter shall be in the range [0:15].
- Return values:
-
None.
Definition at line 2605 of file SPIRIT_Radio.c.
void SpiritRadioSetAGCMeasureTimeUs | ( | uint16_t | nTime ) |
Sets the AGC measure time.
- Parameters:
-
nTime AGC measure time expressed in us. This parameter shall be in the range [0, 393216/F_Xo].
- Return values:
-
None.
Definition at line 2554 of file SPIRIT_Radio.c.
void SpiritRadioSetAGCMode | ( | AGCMode | xMode ) |
Sets the AGC working mode.
- Parameters:
-
xMode the AGC mode. This parameter can be one of the values defined in AGCMode : - AGC_LINEAR_MODE AGC works in linear mode
- AGC_BINARY_MODE AGC works in binary mode
- Return values:
-
None.
Definition at line 2416 of file SPIRIT_Radio.c.
void SpiritRadioSetBand | ( | BandSelect | xBand ) |
Sets the operating band.
- Parameters:
-
xBand the band to set. This parameter can be one of following parameters: - HIGH_BAND High_Band selected: from 779 MHz to 915 MHz
- MIDDLE_BAND: Middle Band selected: from 387 MHz to 470 MHz
- LOW_BAND: Low Band selected: from 300 MHz to 348 MHz
- VERY_LOW_BAND: Very low Band selected: from 150 MHz to 174 MHz
- Return values:
-
None.
Definition at line 685 of file SPIRIT_Radio.c.
void SpiritRadioSetChannel | ( | uint8_t | cChannel ) |
Sets the channel number.
- Parameters:
-
cChannel the channel number.
- Return values:
-
None.
Definition at line 748 of file SPIRIT_Radio.c.
void SpiritRadioSetChannelBW | ( | uint32_t | lBandwidth ) |
Sets the channel filter bandwidth.
- Parameters:
-
lBandwidth channel filter bandwidth expressed in Hz. This parameter shall be in the range [1100 800100] Even if it is possible to pass as parameter any value in the above mentioned range, the API will search the most closer value according to a fixed table of channel bandwidth values (s_vectnBandwidth), as defined in the datasheet. To verify the settled channel bandwidth it is possible to use the SpiritRadioGetChannelBW() API.
- Return values:
-
None.
Definition at line 1365 of file SPIRIT_Radio.c.
void SpiritRadioSetChannelSpace | ( | uint32_t | fChannelSpace ) |
Sets the channel space factor in channel space register.
The channel spacing step is computed as F_Xo/32768.
- Parameters:
-
fChannelSpace the channel space expressed in Hz.
- Return values:
-
None.
Definition at line 779 of file SPIRIT_Radio.c.
void SpiritRadioSetClkRecIGain | ( | uint8_t | cIGain ) |
Sets the clock recovery integral gain.
- Parameters:
-
cIGain the Clock Recovery integral gain to write in the CLK_REC_I_GAIN field of CLOCKREC register. This parameter shall be in the range [0:15].
- Return values:
-
None.
Definition at line 2923 of file SPIRIT_Radio.c.
void SpiritRadioSetClkRecMode | ( | ClkRecMode | xMode ) |
Sets the clock recovery algorithm.
- Parameters:
-
xMode the Clock Recovery mode. This parameter can be one of the values defined in ClkRecMode : - CLK_REC_PLL PLL alogrithm for clock recovery
- CLK_REC_DLL DLL alogrithm for clock recovery
- Return values:
-
None.
Definition at line 2833 of file SPIRIT_Radio.c.
void SpiritRadioSetClkRecPGain | ( | uint8_t | cPGain ) |
Sets the clock recovery proportional gain.
- Parameters:
-
cPGain the Clock Recovery proportional gain to write in the CLK_REC_P_GAIN field of CLOCKREC register. It represents is log2 value of the clock recovery proportional gain. This parameter shall be in the range [0:7].
- Return values:
-
None.
Definition at line 2879 of file SPIRIT_Radio.c.
void SpiritRadioSetClkRecPstFltLength | ( | PstFltLength | xLength ) |
Sets the postfilter length for clock recovery algorithm.
- Parameters:
-
xLength the postfilter length in symbols. This parameter can be one of the values defined in PstFltLength : - PSTFLT_LENGTH_8 Postfilter length is 8 symbols
- PSTFLT_LENGTH_16 Postfilter length is 16 symbols
- Return values:
-
None.
Definition at line 2969 of file SPIRIT_Radio.c.
void SpiritRadioSetDatarate | ( | uint32_t | lDatarate ) |
Sets the datarate.
- Parameters:
-
fDatarate datarate expressed in bps. This value shall be in the range [100 500000].
- Return values:
-
None.
Definition at line 1260 of file SPIRIT_Radio.c.
void SpiritRadioSetDigDiv | ( | SpiritFunctionalState | xNewState ) |
Enables or Disables the synthesizer reference divider.
- Parameters:
-
xNewState new state for synthesizer reference divider. This parameter can be: S_ENABLE or S_DISABLE .
- Return values:
-
None.
Definition at line 3147 of file SPIRIT_Radio.c.
uint8_t SpiritRadioSetFrequencyBase | ( | uint32_t | lFBase ) |
Sets the Synth word and the Band Select register according to desired base carrier frequency.
In this API the Xtal configuration is read out from the corresponding register. The user shall fix it before call this API.
- Parameters:
-
lFBase the base carrier frequency expressed in Hz as unsigned word.
- Return values:
-
Error code: 0=no error, 1=error during calibration of VCO.
Definition at line 920 of file SPIRIT_Radio.c.
void SpiritRadioSetFrequencyDev | ( | uint32_t | lFDev ) |
Sets the frequency deviation.
- Parameters:
-
fFDev frequency deviation expressed in Hz. Be sure that this value is in the correct range [F_Xo*8/2^18, F_Xo*7680/2^18] Hz.
- Return values:
-
None.
Definition at line 1309 of file SPIRIT_Radio.c.
void SpiritRadioSetFrequencyOffset | ( | int32_t | lFOffset ) |
Sets the FC OFFSET register starting from frequency offset expressed in Hz.
- Parameters:
-
lFOffset frequency offset expressed in Hz as signed word.
- Return values:
-
None.
Definition at line 858 of file SPIRIT_Radio.c.
void SpiritRadioSetFrequencyOffsetPpm | ( | int16_t | nXtalPpm ) |
Sets the FC OFFSET register starting from xtal ppm value.
- Parameters:
-
nXtalPpm the xtal offset expressed in ppm.
- Return values:
-
None.
Definition at line 816 of file SPIRIT_Radio.c.
void SpiritRadioSetModulation | ( | ModulationSelect | xModulation ) |
Sets the modulation type.
- Parameters:
-
xModulation modulation to set. This parameter shall be of type ModulationSelect .
- Return values:
-
None.
Definition at line 1414 of file SPIRIT_Radio.c.
void SpiritRadioSetOokPeakDecay | ( | OokPeakDecay | xOokDecay ) |
Sets the OOK Peak Decay.
- Parameters:
-
xOokDecay Peak decay control for OOK. This parameter shall be of type OokPeakDecay .
- Return values:
-
None.
Definition at line 1488 of file SPIRIT_Radio.c.
void SpiritRadioSetPACwc | ( | PALoadCapacitor | xCLoad ) |
Sets the output stage additional load capacitor bank.
- Parameters:
-
xCLoad one of the possible value of the enum type PALoadCapacitor. - LOAD_0_PF No additional PA load capacitor
- LOAD_1_2_PF 1.2pF additional PA load capacitor
- LOAD_2_4_PF 2.4pF additional PA load capacitor
- LOAD_3_6_PF 3.6pF additional PA load capacitor
- Return values:
-
None.
Definition at line 1886 of file SPIRIT_Radio.c.
void SpiritRadioSetPALevel | ( | uint8_t | cIndex, |
uint8_t | cPower | ||
) |
Sets a specific PA_LEVEL register.
- Parameters:
-
cIndex PA_LEVEL to set. This parameter shall be in the range [0:7]. cPower PA value to write in the register. Be sure that this values is in the correct range [0 : 90].
- Return values:
-
None.
Definition at line 1837 of file SPIRIT_Radio.c.
void SpiritRadioSetPALeveldBm | ( | uint8_t | cIndex, |
float | fPowerdBm | ||
) |
Sets a specific PA_LEVEL register, with a value given in dBm.
- Parameters:
-
cIndex PA_LEVEL to set. This parameter shall be in the range [0:7]. fPowerdBm PA value to write expressed in dBm . Be sure that this values is in the correct range [-PA_LOWER_LIMIT: PA_UPPER_LIMIT] dBm.
- Return values:
-
None.
- Note:
- This function makes use of the SpiritRadioGetdBm2Reg fcn to interpolate the power value.
Definition at line 1709 of file SPIRIT_Radio.c.
void SpiritRadioSetPALevelMaxIndex | ( | uint8_t | cIndex ) |
Sets a specific PA_LEVEL_MAX_INDEX.
- Parameters:
-
cIndex PA_LEVEL_MAX_INDEX to set. This parameter shall be in the range [0:7].
- Return values:
-
None
Definition at line 1934 of file SPIRIT_Radio.c.
void SpiritRadioSetPAStepWidth | ( | uint8_t | cWidth ) |
Sets a specific PA_RAMP_STEP_WIDTH.
- Parameters:
-
cWidth step width expressed in terms of bit period units Tb/8. This parameter shall be in the range [1:4].
- Return values:
-
None.
Definition at line 1978 of file SPIRIT_Radio.c.
void SpiritRadioSetPATable | ( | uint8_t | cPALevelMaxIndex, |
uint8_t | cWidth, | ||
PALoadCapacitor | xCLoad, | ||
uint8_t * | pcPAtable | ||
) |
Configures the Power Amplifier Table and registers.
- Parameters:
-
cPALevelMaxIndex number of levels to set. This parameter shall be in the range [0:7]. cWidth step width expressed in terms of bit period units Tb/8. This parameter shall be in the range [1:4]. xCLoad one of the possible value of the enum type PALoadCapacitor. - LOAD_0_PF No additional PA load capacitor
- LOAD_1_2_PF 1.2pF additional PA load capacitor
- LOAD_2_4_PF 2.4pF additional PA load capacitor
- LOAD_3_6_PF 3.6pF additional PA load capacitor
pcPAtable pointer to an array of PA values in the range [0: 90], where 0 implies no output power, 1 will be the maximum level and 90 the minimum one The first element shall be the lower level (PA_LEVEL[0]) value and the last element the higher level one (PA_LEVEL[paLevelMaxIndex]).
- Return values:
-
None.
Definition at line 1771 of file SPIRIT_Radio.c.
void SpiritRadioSetPATabledBm | ( | uint8_t | cPALevelMaxIndex, |
uint8_t | cWidth, | ||
PALoadCapacitor | xCLoad, | ||
float * | pfPAtabledBm | ||
) |
Configures the Power Amplifier Table and registers with value expressed in dBm.
- Parameters:
-
cPALevelMaxIndex number of levels to set. This parameter shall be in the range [0:7]. cWidth step width expressed in terms of bit period units Tb/8. This parameter shall be in the range [1:4]. xCLoad one of the possible value of the enum type PALoadCapacitor. - LOAD_0_PF No additional PA load capacitor
- LOAD_1_2_PF 1.2pF additional PA load capacitor
- LOAD_2_4_PF 2.4pF additional PA load capacitor
- LOAD_3_6_PF 3.6pF additional PA load capacitor
pfPAtabledBm pointer to an array of PA values in dbm between [-PA_LOWER_LIMIT: PA_UPPER_LIMIT] dbm. The first element shall be the lower level (PA_LEVEL[0]) value and the last element the higher level one (PA_LEVEL[paLevelMaxIndex]).
- Return values:
-
None.
Definition at line 1633 of file SPIRIT_Radio.c.
void SpiritRadioSetRefDiv | ( | SpiritFunctionalState | xNewState ) |
Enables or Disables the synthesizer reference divider.
- Parameters:
-
xNewState new state for synthesizer reference divider. This parameter can be: S_ENABLE or S_DISABLE .
- Return values:
-
None.
Definition at line 3075 of file SPIRIT_Radio.c.
void SpiritRadioSetSynthWord | ( | uint32_t | lSynthWord ) |
Sets the SYNTH registers.
- Parameters:
-
lSynthWord the synth word to write in the SYNTH[3:0] registers.
- Return values:
-
None.
Definition at line 652 of file SPIRIT_Radio.c.
void SpiritRadioSetXtalFlag | ( | XtalFlag | xXtal ) |
Sets the Xtal configuration in the ANA_FUNC_CONF0 register.
- Parameters:
-
xXtal one of the possible value of the enum type XtalFrequency. - XTAL_FLAG_24_MHz: in case of 24 MHz crystal
- XTAL_FLAG_26_MHz: in case of 26 MHz crystal
- Return values:
-
None.
Definition at line 529 of file SPIRIT_Radio.c.
void SpiritRadioSetXtalFrequency | ( | uint32_t | lXtalFrequency ) |
Sets the XTAL frequency.
- Parameters:
-
uint32_t XTAL frequency.
- Return values:
-
void.
Definition at line 3209 of file SPIRIT_Radio.c.
void SpiritRadioVcoCalibrationWAFB | ( | SpiritFunctionalState | xNewstate ) |
To say to the set frequency base if do or not the VCO calibration WA.
- Parameters:
-
S_ENABLE or S_DISABLE the WA procedure.
- Return values:
-
None.
Definition at line 1028 of file SPIRIT_Radio.c.
Generated on Wed Jul 13 2022 00:11:58 by
