Appiko
Functions
Radio Private Functions

Functions

void S2LPRadioSearchDatarateME (uint32_t lDatarate, uint16_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. More...
 
void S2LPRadioSearchFreqDevME (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. More...
 
void S2LPRadioSearchChannelBwME (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. More...
 
uint32_t S2LPRadioComputeDatarate (uint16_t cM, uint8_t cE)
 Returns the mantissa and exponent, whose value used in the datarate formula will give the datarate value closer to the given datarate. More...
 
uint32_t S2LPRadioComputeFreqDeviation (uint8_t cM, uint8_t cE, uint8_t bs, uint8_t refdiv)
 Returns the mantissa and exponent, whose value used in the datarate formula will give the datarate value closer to the given datarate. More...
 
uint32_t S2LPRadioComputeChannelFilterBw (uint8_t cM, uint8_t cE)
 Computes the channel filter value starting from mantissa and exponent. More...
 
uint32_t S2LPRadioComputeFrequencyBase (uint32_t lSynthWord, uint8_t bs, uint8_t refdiv)
 Computes a frequency from a given SYNTH word. More...
 
uint32_t S2LPRadioComputeSynthWord (uint32_t frequency, uint8_t refdiv)
 Computes the synth word from a given frequency. More...
 
uint8_t S2LPRadioComputeChannelSpacingRegValue (uint32_t lChannelSpace)
 Computes the channel space register staring from the channel space value in Hz. The channel spacing step is F_Xo/32768. More...
 
uint32_t S2LPRadioComputeChannelSpacing (uint8_t cChSpaceRegVal)
 Compute the channel spacing register from the channel spacing given in Hz. The channel spacing step is F_Xo/32768. More...
 
void S2LPRadioComputeIF (uint32_t nIF, uint8_t *pcAnaIf, uint8_t *pcDigIf)
 Computes the ANALOG_IF and DIGITAL_IF register values staring from a image frequency value in Hz. More...
 
void S2LPRadioSearchWCP (uint8_t *cp_isel, uint8_t *pfd_split, uint32_t lFc, uint8_t refdiv)
 Returns the charge pump word for a given VCO frequency. More...
 

Detailed Description

Function Documentation

◆ S2LPRadioComputeChannelFilterBw()

uint32_t S2LPRadioComputeChannelFilterBw ( uint8_t  cM,
uint8_t  cE 
)
Parameters
cMmantissa value.
cEexponent value.
Return values
uint32_tthe channel filter value in Hz.

Definition at line 386 of file S2LP_Radio.c.

◆ S2LPRadioComputeChannelSpacing()

uint32_t S2LPRadioComputeChannelSpacing ( uint8_t  cChSpaceRegVal)
Parameters
cChSpaceRegValthe channel spacing register
Return values
uint32_tThe channel specing value in Hz.

Definition at line 461 of file S2LP_Radio.c.

◆ S2LPRadioComputeChannelSpacingRegValue()

uint8_t S2LPRadioComputeChannelSpacingRegValue ( uint32_t  lChannelSpace)
Parameters
lChannelSpacethe channel spacing expressed in Hz.
Return values
uint8_tThe channel specing register value .

Definition at line 449 of file S2LP_Radio.c.

Referenced by S2LPRadioSetChannelSpace().

◆ S2LPRadioComputeDatarate()

uint32_t S2LPRadioComputeDatarate ( uint16_t  cM,
uint8_t  cE 
)
Parameters
fDataratedatarate expressed in bps. This parameter ranging between 100 and 500000.
pcMpointer to the returned mantissa value.
pcEpointer to the returned exponent value.
Return values
None.

Definition at line 341 of file S2LP_Radio.c.

◆ S2LPRadioComputeFreqDeviation()

uint32_t S2LPRadioComputeFreqDeviation ( uint8_t  cM,
uint8_t  cE,
uint8_t  bs,
uint8_t  refdiv 
)
Parameters
fDataratedatarate expressed in bps. This parameter ranging between 100 and 500000.
pcMpointer to the returned mantissa value.
pcEpointer to the returned exponent value.
Return values
None.

Definition at line 368 of file S2LP_Radio.c.

◆ S2LPRadioComputeFrequencyBase()

uint32_t S2LPRadioComputeFrequencyBase ( uint32_t  lSynthWord,
uint8_t  bs,
uint8_t  refdiv 
)
Parameters
lSynthWordthe given SYNTH word.
bsvalue of the PLL divider.
refdivreference divider value value (it can be only 1 or 2).
Return values
uint32_tthe frequency base filter value in Hz.

Definition at line 406 of file S2LP_Radio.c.

◆ S2LPRadioComputeIF()

void S2LPRadioComputeIF ( uint32_t  nIF,
uint8_t *  pcAnaIf,
uint8_t *  pcDigIf 
)
Parameters
nIFdatarate expressed in bps. This parameter ranging between 100 and 500000.
pcAnaIfpointer to the register of analog IF.
pcDigIfpointer to the returned of digital IF.
Return values
None.

Definition at line 475 of file S2LP_Radio.c.

◆ S2LPRadioComputeSynthWord()

uint32_t S2LPRadioComputeSynthWord ( uint32_t  frequency,
uint8_t  refdiv 
)
Parameters
frequencyTarget frequency value expressed in Hz.
refdivreference divider value value (it can be only 1 or 2).
Return values
uint32_tSYNTH_WORD.

Definition at line 418 of file S2LP_Radio.c.

◆ S2LPRadioSearchChannelBwME()

void S2LPRadioSearchChannelBwME ( uint32_t  lBandwidth,
uint8_t *  pcM,
uint8_t *  pcE 
)
Parameters
lBandwidthbandwidth expressed in Hz. This parameter ranging between 1100 and 800100.
pcMpointer to the returned mantissa value.
pcEpointer to the returned exponent value.
Return values
None.

Definition at line 291 of file S2LP_Radio.c.

◆ S2LPRadioSearchDatarateME()

void S2LPRadioSearchDatarateME ( uint32_t  lDatarate,
uint16_t *  pcM,
uint8_t *  pcE 
)
Parameters
fDataratedatarate expressed in bps. This parameter ranging between 100 and 500000.
pcMpointer to the returned mantissa value.
pcEpointer to the returned exponent value.
Return values
None.

Definition at line 192 of file S2LP_Radio.c.

◆ S2LPRadioSearchFreqDevME()

void S2LPRadioSearchFreqDevME ( uint32_t  lFDev,
uint8_t *  pcM,
uint8_t *  pcE 
)
Parameters
fFDevfrequency deviation expressed in Hz. This parameter can be a value in the range [F_Xo*8/2^18, F_Xo*7680/2^18].
pcMpointer to the returned mantissa value.
pcEpointer to the returned exponent value.
Return values
None.

Definition at line 236 of file S2LP_Radio.c.

References MIDDLE_BAND_FACTOR.

◆ S2LPRadioSearchWCP()

void S2LPRadioSearchWCP ( uint8_t *  cp_isel,
uint8_t *  pfd_split,
uint32_t  lFc,
uint8_t  refdiv 
)
Parameters
cp_iselpointer to the charge pump register value.
pfd_splitpointer to the pfd register value.
lFcchannel 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
refdivreference divider value value (it can be only 1 or 2).
Return values
uint8_tCharge pump word.

Definition at line 499 of file S2LP_Radio.c.

References MIDDLE_BAND_FACTOR.