Appiko
Functions
Radio Exported Functions

Functions

uint8_t S2LPRadioInit (SRadioInit *pxSRadioInitStruct)
 Initializes the S2LP analog and digital radio part according to the specified parameters in the pxSRadioInitStruct. More...
 
void S2LPRadioGetInfo (SRadioInit *pxSRadioInitStruct)
 Returns the S2LP analog and digital radio structure according to the registers value. More...
 
void S2LPRadioSetSynthWord (uint32_t lSynthWord)
 Sets the SYNTH registers. More...
 
uint32_t S2LPRadioGetSynthWord (void)
 Returns the synth word. More...
 
void S2LPRadioSetChannel (uint8_t cChannel)
 Sets the channel number. More...
 
uint8_t S2LPRadioGetChannel (void)
 Returns the actual channel number. More...
 
void S2LPRadioSetRefDiv (SFunctionalState xNewState)
 Set the reference divider value. More...
 
SFunctionalState S2LPRadioGetRefDiv (void)
 To know if the reference deivider is enabled or disabled. More...
 
void S2LPRadioSetDigDiv (SFunctionalState xNewState)
 Set the digital divider . More...
 
SFunctionalState S2LPRadioGetDigDiv (void)
 Get the digital divider . More...
 
void S2LPRadioSetChannelSpace (uint32_t lChannelSpace)
 Set the channel space factor in channel space register. The channel spacing step is computed as F_Xo/32768. More...
 
uint32_t S2LPRadioGetChannelSpace (void)
 Return the channel space register. More...
 
uint8_t S2LPRadioSetFrequencyBase (uint32_t lFBase)
 Set 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. More...
 
uint32_t S2LPRadioGetFrequencyBase (void)
 Return the base carrier frequency. More...
 
void S2LPRadioSetDatarate (uint32_t lDatarate)
 Set the datarate. More...
 
uint32_t S2LPRadioGetDatarate (void)
 Return the datarate. More...
 
void S2LPRadioSetFrequencyDev (uint32_t lFDev)
 Set the frequency deviation. More...
 
uint32_t S2LPRadioGetFrequencyDev (void)
 Return the frequency deviation. More...
 
void S2LPRadioSetChannelBW (uint32_t lBandwidth)
 Set the channel filter bandwidth. More...
 
uint32_t S2LPRadioGetChannelBW (void)
 Return the channel filter bandwidth. More...
 
void S2LPRadioSetModulation (ModulationSelect xModulation)
 Set the modulation type. More...
 
ModulationSelect S2LPRadioGetModulation (void)
 Return the modulation type used. More...
 
void S2LPRadioSetXtalFrequency (uint32_t lXtalFrequency)
 Set the XTAL frequency. More...
 
uint32_t S2LPRadioGetXtalFrequency (void)
 Return the XTAL frequency. More...
 
void S2LPRadioSetIsiEqualizationMode (SIsiEqu xSIsiMode)
 Set the ISI equalizer. More...
 
SIsiEqu S2LPRadioGetIsiEqualizationMode (void)
 Returnthe ISI equalization. More...
 
void S2LPRadioCalibrationVco (SFunctionalState xAmplitudeCalibration, SFunctionalState xFrequencyCalibration)
 Enable the calibration of the VCO frequency and amplitude. More...
 
void S2LPRadioSetTxCalibVcoAmpWord (uint8_t value)
 Set calibration word of the aplitude in TX. More...
 
void S2LPRadioSetRxCalibVcoAmpWord (uint8_t value)
 Set calibration word of the aplitude in RX. More...
 
void S2LPRadioSetTxCalibVcoFreqWord (uint8_t value)
 Set calibration word of the frequency in TX. More...
 
void S2LPRadioSetRxCalibVcoFreqWord (uint8_t value)
 Set calibration word of the frequency in RX. More...
 
void S2LPRadioSetMaxPALevel (SFunctionalState xNewState)
 Set the MAX_DBM bit. This will allow to transmit at the maximum power. More...
 
void S2LPRadioSetPALeveldBm (uint8_t cIndex, int32_t wPowerdBm)
 Sets a specific PA_LEVEL register, with a value given in dBm. More...
 
int32_t S2LPRadioGetPALeveldBm (uint8_t cIndex)
 Returns a specific PA_LEVEL register, returning a value in dBm. More...
 
uint8_t S2LPRadioGetPALevelMaxIndex (void)
 Returns the actual PA_LEVEL_MAX_INDEX. More...
 
void S2LPRadioSetPALevelMaxIndex (uint8_t cIndex)
 Sets a specific PA_LEVEL_MAX_INDEX. More...
 
void S2LPRadioSetManualRampingMode (SFunctionalState xNewState)
 Set the manual ramping mode. More...
 
void S2LPRadioSetAutoRampingMode (SFunctionalState xNewState)
 Set the autoramping mode. If enabled: More...
 
void S2LPRadioAfcInit (SAfcInit *xSAfcInit)
 Initialize the AFC block according to the passed parameters. More...
 
void S2LPRadioGetAfcInfo (SAfcInit *xSAfcInit)
 Return the AFC struct that corresponds to the AFC block parameters set on the chip. More...
 
void S2LPRadioSymClkRecoverInit (SSymClkRecInit *xSSymClkRecInit)
 Clock recovery configuration. More...
 
void S2LPRadioGetSymClkRecoverInfo (SSymClkRecInit *xSSymClkRecInit)
 Return the clock recovery configuration. More...
 

Detailed Description

Function Documentation

◆ S2LPRadioAfcInit()

void S2LPRadioAfcInit ( SAfcInit xSAfcInit)
Parameters
xSAfcInitpointer to the AFC struct that contains the parameters value to be set.
Return values
None.

Definition at line 1414 of file S2LP_Radio.c.

◆ S2LPRadioCalibrationVco()

void S2LPRadioCalibrationVco ( SFunctionalState  xAmplitudeCalibration,
SFunctionalState  xFrequencyCalibration 
)
Parameters
xAmplitudeCalibrationEnables or Disables the calibration of the VCO Amplitude .
xFrequencyCalibrationEnables or Disables the calibration of the VCO Frequency .
Return values
None.

Definition at line 1344 of file S2LP_Radio.c.

◆ S2LPRadioGetAfcInfo()

void S2LPRadioGetAfcInfo ( SAfcInit xSAfcInit)
Parameters
xSAfcInitpointer to the AFC struct that must be filled with the parameters.
Return values
None.

Definition at line 1462 of file S2LP_Radio.c.

◆ S2LPRadioGetChannel()

uint8_t S2LPRadioGetChannel ( void  )
Parameters
None.
Return values
uint8_tActual channel number.

Definition at line 782 of file S2LP_Radio.c.

References g_xStatus.

◆ S2LPRadioGetChannelBW()

uint32_t S2LPRadioGetChannelBW ( void  )
Parameters
None.
Return values
uint32_tChannel filter bandwidth expressed in Hz.

Definition at line 1109 of file S2LP_Radio.c.

References g_xStatus.

◆ S2LPRadioGetChannelSpace()

uint32_t S2LPRadioGetChannelSpace ( void  )
Parameters
None.
Return values
uint32_tChannel 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 891 of file S2LP_Radio.c.

References g_xStatus.

◆ S2LPRadioGetDatarate()

uint32_t S2LPRadioGetDatarate ( void  )
Parameters
None.
Return values
uint32_tSettled datarate expressed in bps.

Definition at line 1013 of file S2LP_Radio.c.

References g_xStatus.

◆ S2LPRadioGetDigDiv()

SFunctionalState S2LPRadioGetDigDiv ( void  )
Return values
SFunctionalStateS_DISABLE to disable the digital divider and S_ENABLE to enable it.

Definition at line 857 of file S2LP_Radio.c.

References g_xStatus.

◆ S2LPRadioGetFrequencyBase()

uint32_t S2LPRadioGetFrequencyBase ( void  )
Parameters
None.
Return values
uint32_tBase carrier frequency expressed in Hz as unsigned word.

Definition at line 946 of file S2LP_Radio.c.

References g_xStatus.

◆ S2LPRadioGetFrequencyDev()

uint32_t S2LPRadioGetFrequencyDev ( void  )
Parameters
None.
Return values
uint32_tFrequency 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 1055 of file S2LP_Radio.c.

References g_xStatus, HIGH_BAND_FACTOR, and S2LPRadioGetRefDiv().

◆ S2LPRadioGetInfo()

void S2LPRadioGetInfo ( SRadioInit pxSRadioInitStruct)
Parameters
pxSRadioInitStructpointer to a SRadioInit structure that contains the configuration information for the analog radio part of S2LP.
Return values
None.

Definition at line 675 of file S2LP_Radio.c.

◆ S2LPRadioGetIsiEqualizationMode()

SIsiEqu S2LPRadioGetIsiEqualizationMode ( void  )
Parameters
None.
Return values
xSIsiModeIt can be one of the values of SIsiEqu.

Definition at line 1501 of file S2LP_Radio.c.

References g_xStatus.

◆ S2LPRadioGetModulation()

ModulationSelect S2LPRadioGetModulation ( void  )
Parameters
None.
Return values
ModulationSelectSettled modulation type.

Definition at line 1146 of file S2LP_Radio.c.

References g_xStatus.

◆ S2LPRadioGetPALeveldBm()

int32_t S2LPRadioGetPALeveldBm ( uint8_t  cIndex)
Parameters
cIndexPA_LEVEL to read. This parameter shall be in the range [0:7]
Return values
int32_tSettled 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 S2LPRadioGetReg2dBm fcn to interpolate the power value.

Definition at line 1238 of file S2LP_Radio.c.

◆ S2LPRadioGetPALevelMaxIndex()

uint8_t S2LPRadioGetPALevelMaxIndex ( void  )
Parameters
None.
Return values
uint8_tActual PA_LEVEL_MAX_INDEX. This parameter will be in the range [0:7].

Definition at line 1273 of file S2LP_Radio.c.

References g_xStatus.

◆ S2LPRadioGetRefDiv()

SFunctionalState S2LPRadioGetRefDiv ( void  )
Parameters
None.
Return values
SFunctionalStateSET (enabled) or RESET (disabled).

Definition at line 817 of file S2LP_Radio.c.

References g_xStatus.

Referenced by S2LPRadioGetFrequencyDev().

◆ S2LPRadioGetSymClkRecoverInfo()

void S2LPRadioGetSymClkRecoverInfo ( SSymClkRecInit xSSymClkRecInit)
Parameters
xSSymClkRecInitpointer to the clock recovery struct to be filled with the clock recovery settings of the chip.
Return values
None.

Definition at line 1549 of file S2LP_Radio.c.

◆ S2LPRadioGetSynthWord()

uint32_t S2LPRadioGetSynthWord ( void  )
Parameters
None.
Return values
uint32_tSynth word.

Definition at line 758 of file S2LP_Radio.c.

References g_xStatus.

◆ S2LPRadioGetXtalFrequency()

uint32_t S2LPRadioGetXtalFrequency ( void  )
Parameters
void.
Return values
uint32_tXTAL frequency.

Definition at line 1173 of file S2LP_Radio.c.

Referenced by S2LPTimerComputeRxTimerRegValues(), S2LPTimerComputeRxTimerValues(), and S2LPTimerGetRcoFrequency().

◆ S2LPRadioInit()

uint8_t S2LPRadioInit ( SRadioInit pxSRadioInitStruct)
Parameters
pxSRadioInitStructpointer to a SRadioInit structure that contains the configuration information for the analog radio part of S2LP.
Return values
Errorcode: 0=no error, 1=error during calibration of VCO.

Definition at line 559 of file S2LP_Radio.c.

◆ S2LPRadioSetAutoRampingMode()

void S2LPRadioSetAutoRampingMode ( SFunctionalState  xNewState)
  • Disable the MAXDBM
  • Disable the PA_RAMPING
  • Enable the FIR_EN
Parameters
xNewStateSet the autoramping mode.
Return values
None.

Definition at line 1292 of file S2LP_Radio.c.

◆ S2LPRadioSetChannel()

void S2LPRadioSetChannel ( uint8_t  cChannel)
Parameters
cChannelthe channel number.
Return values
None.

Definition at line 771 of file S2LP_Radio.c.

References g_xStatus.

◆ S2LPRadioSetChannelBW()

void S2LPRadioSetChannelBW ( uint32_t  lBandwidth)
Parameters
lBandwidthchannel 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 S2LPRadioGetChannelBW() API.
Return values
None.

Definition at line 1083 of file S2LP_Radio.c.

◆ S2LPRadioSetChannelSpace()

void S2LPRadioSetChannelSpace ( uint32_t  lChannelSpace)
Parameters
fChannelSpacethe channel space expressed in Hz.
Return values
None.

Definition at line 877 of file S2LP_Radio.c.

References g_xStatus, and S2LPRadioComputeChannelSpacingRegValue().

◆ S2LPRadioSetDatarate()

void S2LPRadioSetDatarate ( uint32_t  lDatarate)
Parameters
fDataratedatarate expressed in bps. This value shall be in the range [100 500000].
Return values
None.

Definition at line 978 of file S2LP_Radio.c.

◆ S2LPRadioSetDigDiv()

void S2LPRadioSetDigDiv ( SFunctionalState  xNewState)
Parameters
xNewStateS_DISABLE to disable the digital divider and S_ENABLE to enable it.
Return values
None.

Definition at line 836 of file S2LP_Radio.c.

◆ S2LPRadioSetFrequencyBase()

uint8_t S2LPRadioSetFrequencyBase ( uint32_t  lFBase)
Parameters
lFBasethe base carrier frequency expressed in Hz as unsigned word.
Return values
Errorcode: 0=no error, 1=error during calibration of VCO.

Definition at line 906 of file S2LP_Radio.c.

◆ S2LPRadioSetFrequencyDev()

void S2LPRadioSetFrequencyDev ( uint32_t  lFDev)
Parameters
fFDevfrequency 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 1032 of file S2LP_Radio.c.

◆ S2LPRadioSetIsiEqualizationMode()

void S2LPRadioSetIsiEqualizationMode ( SIsiEqu  xSIsiMode)
Parameters
xSIsiModeIt can be one of the values of SIsiEqu.
Return values
None.

Definition at line 1484 of file S2LP_Radio.c.

◆ S2LPRadioSetManualRampingMode()

void S2LPRadioSetManualRampingMode ( SFunctionalState  xNewState)
  • Disable the MAXDBM
  • Enable the PA_RAMPING
  • Disable the FIR_EN
Parameters
xNewStateSet the manual ramping mode.
Return values
None.

Definition at line 1320 of file S2LP_Radio.c.

◆ S2LPRadioSetMaxPALevel()

void S2LPRadioSetMaxPALevel ( SFunctionalState  xNewState)
Parameters
xNewStateenable (S_ENABLE) to enable or disable (S_DISABLE) the max dBm.
Return values
None.

Definition at line 1184 of file S2LP_Radio.c.

◆ S2LPRadioSetModulation()

void S2LPRadioSetModulation ( ModulationSelect  xModulation)
Parameters
xModulationmodulation to set. This parameter shall be of type ModulationSelect .
Return values
None.

Definition at line 1129 of file S2LP_Radio.c.

◆ S2LPRadioSetPALeveldBm()

void S2LPRadioSetPALeveldBm ( uint8_t  cIndex,
int32_t  lPowerdBm 
)
Parameters
cIndexPA_LEVEL to set. This parameter shall be in the range [0:7].
lPowerdBmPA 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 S2LPRadioGetdBm2Reg fcn to interpolate the power value.

Definition at line 1209 of file S2LP_Radio.c.

◆ S2LPRadioSetPALevelMaxIndex()

void S2LPRadioSetPALevelMaxIndex ( uint8_t  cIndex)
Parameters
cIndexPA_LEVEL_MAX_INDEX to set. This parameter shall be in the range [0:7].
Return values
None

Definition at line 1256 of file S2LP_Radio.c.

◆ S2LPRadioSetRefDiv()

void S2LPRadioSetRefDiv ( SFunctionalState  xNewState)
Parameters
xNewState: S_DISABLE to disable the reference divider and S_ENABLE to enable it.
Return values
None.

Definition at line 795 of file S2LP_Radio.c.

◆ S2LPRadioSetRxCalibVcoAmpWord()

void S2LPRadioSetRxCalibVcoAmpWord ( uint8_t  value)
Parameters
valueValue of the amplitude calibration word.
Return values
None.

Definition at line 1382 of file S2LP_Radio.c.

◆ S2LPRadioSetRxCalibVcoFreqWord()

void S2LPRadioSetRxCalibVcoFreqWord ( uint8_t  value)
Parameters
valueValue of the frequency calibration word.
Return values
None.

Definition at line 1403 of file S2LP_Radio.c.

References g_xStatus.

◆ S2LPRadioSetSynthWord()

void S2LPRadioSetSynthWord ( uint32_t  lSynthWord)
Parameters
lSynthWordthe synth word to write in the SYNTH[3:0] registers.
Return values
None.

Definition at line 735 of file S2LP_Radio.c.

◆ S2LPRadioSetTxCalibVcoAmpWord()

void S2LPRadioSetTxCalibVcoAmpWord ( uint8_t  value)
Parameters
valueValue of the amplitude calibration word.
Return values
None.

Definition at line 1371 of file S2LP_Radio.c.

References g_xStatus.

◆ S2LPRadioSetTxCalibVcoFreqWord()

void S2LPRadioSetTxCalibVcoFreqWord ( uint8_t  value)
Parameters
valueValue of the frequency calibration word.
Return values
None.

Definition at line 1393 of file S2LP_Radio.c.

References g_xStatus.

◆ S2LPRadioSetXtalFrequency()

void S2LPRadioSetXtalFrequency ( uint32_t  lXtalFrequency)
Note
this function must be called before any Radio setting.
Parameters
uint32_tXTAL frequency.
Return values
void.

Definition at line 1162 of file S2LP_Radio.c.

◆ S2LPRadioSymClkRecoverInit()

void S2LPRadioSymClkRecoverInit ( SSymClkRecInit xSSymClkRecInit)
Parameters
xSSymClkRecInitpointer to the clock recovery struct to be used to configure the algorithm.
Return values
None.

Definition at line 1516 of file S2LP_Radio.c.