![]() |
S2-LP Low Level API
v. 1.3.0
|
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 | 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 lPowerdBm) |
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... | |
void | S2LPRadioSetPALevelMaxIndex (uint8_t cIndex) |
Sets a specific PA_LEVEL_MAX_INDEX. More... | |
uint8_t | S2LPRadioGetPALevelMaxIndex (void) |
Returns the actual PA_LEVEL_MAX_INDEX. More... | |
void | S2LPRadioSetAutoRampingMode (SFunctionalState xNewState) |
Set the autoramping mode. If enabled: More... | |
void | S2LPRadioSetManualRampingMode (SFunctionalState xNewState) |
Set the manual ramping mode. 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 | 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 | S2LPRadioSetIsiEqualizationMode (SIsiEqu xSIsiMode) |
Set the ISI equalizer. More... | |
SIsiEqu | S2LPRadioGetIsiEqualizationMode (void) |
Returnthe ISI equalization. More... | |
void | S2LPRadioSymClkRecoverInit (SSymClkRecInit *xSSymClkRecInit) |
Clock recovery configuration. More... | |
void | S2LPRadioGetSymClkRecoverInfo (SSymClkRecInit *xSSymClkRecInit) |
Return the clock recovery configuration. More... | |
void S2LPRadioAfcInit | ( | SAfcInit * | xSAfcInit | ) |
Initialize the AFC block according to the passed parameters.
xSAfcInit | pointer to the AFC struct that contains the parameters value to be set. |
None. |
Definition at line 1412 of file S2LP_Radio.c.
void S2LPRadioCalibrationVco | ( | SFunctionalState | xAmplitudeCalibration, |
SFunctionalState | xFrequencyCalibration | ||
) |
Enable the calibration of the VCO frequency and amplitude.
xAmplitudeCalibration | Enables or Disables the calibration of the VCO Amplitude . |
xFrequencyCalibration | Enables or Disables the calibration of the VCO Frequency . |
None. |
Definition at line 1342 of file S2LP_Radio.c.
void S2LPRadioGetAfcInfo | ( | SAfcInit * | xSAfcInit | ) |
Return the AFC struct that corresponds to the AFC block parameters set on the chip.
xSAfcInit | pointer to the AFC struct that must be filled with the parameters. |
None. |
Definition at line 1460 of file S2LP_Radio.c.
uint8_t S2LPRadioGetChannel | ( | void | ) |
Returns the actual channel number.
None. |
uint8_t | Actual channel number. |
Definition at line 780 of file S2LP_Radio.c.
uint32_t S2LPRadioGetChannelBW | ( | void | ) |
Return the channel filter bandwidth.
None. |
uint32_t | Channel filter bandwidth expressed in Hz. |
Definition at line 1107 of file S2LP_Radio.c.
uint32_t S2LPRadioGetChannelSpace | ( | void | ) |
Return the channel space register.
None. |
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 889 of file S2LP_Radio.c.
uint32_t S2LPRadioGetDatarate | ( | void | ) |
Return the datarate.
None. |
uint32_t | Settled datarate expressed in bps. |
Definition at line 1011 of file S2LP_Radio.c.
SFunctionalState S2LPRadioGetDigDiv | ( | void | ) |
Get the digital divider .
SFunctionalState | S_DISABLE to disable the digital divider and S_ENABLE to enable it. |
Definition at line 855 of file S2LP_Radio.c.
uint32_t S2LPRadioGetFrequencyBase | ( | void | ) |
Return the base carrier frequency.
None. |
uint32_t | Base carrier frequency expressed in Hz as unsigned word. |
Definition at line 944 of file S2LP_Radio.c.
uint32_t S2LPRadioGetFrequencyDev | ( | void | ) |
Return the frequency deviation.
None. |
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 1053 of file S2LP_Radio.c.
void S2LPRadioGetInfo | ( | SRadioInit * | pxSRadioInitStruct | ) |
Returns the S2LP analog and digital radio structure according to the registers value.
pxSRadioInitStruct | pointer to a SRadioInit structure that contains the configuration information for the analog radio part of S2LP. |
None. |
Definition at line 673 of file S2LP_Radio.c.
SIsiEqu S2LPRadioGetIsiEqualizationMode | ( | void | ) |
Returnthe ISI equalization.
None. |
xSIsiMode | It can be one of the values of SIsiEqu. |
Definition at line 1499 of file S2LP_Radio.c.
ModulationSelect S2LPRadioGetModulation | ( | void | ) |
Return the modulation type used.
None. |
ModulationSelect | Settled modulation type. |
Definition at line 1144 of file S2LP_Radio.c.
int32_t S2LPRadioGetPALeveldBm | ( | uint8_t | cIndex | ) |
Returns a specific PA_LEVEL register, returning a value in dBm.
cIndex | PA_LEVEL to read. This parameter shall be in the range [0:7] |
int32_t | Settled power level expressed in dBm. A value higher than PA_UPPER_LIMIT dBm implies no output power (output stage is in high impedance). |
Definition at line 1236 of file S2LP_Radio.c.
uint8_t S2LPRadioGetPALevelMaxIndex | ( | void | ) |
Returns the actual PA_LEVEL_MAX_INDEX.
None. |
uint8_t | Actual PA_LEVEL_MAX_INDEX. This parameter will be in the range [0:7]. |
Definition at line 1271 of file S2LP_Radio.c.
SFunctionalState S2LPRadioGetRefDiv | ( | void | ) |
To know if the reference deivider is enabled or disabled.
None. |
SFunctionalState | SET (enabled) or RESET (disabled). |
Definition at line 815 of file S2LP_Radio.c.
void S2LPRadioGetSymClkRecoverInfo | ( | SSymClkRecInit * | xSSymClkRecInit | ) |
Return the clock recovery configuration.
xSSymClkRecInit | pointer to the clock recovery struct to be filled with the clock recovery settings of the chip. |
None. |
Definition at line 1547 of file S2LP_Radio.c.
uint32_t S2LPRadioGetSynthWord | ( | void | ) |
Returns the synth word.
None. |
uint32_t | Synth word. |
Definition at line 756 of file S2LP_Radio.c.
uint32_t S2LPRadioGetXtalFrequency | ( | void | ) |
Return the XTAL frequency.
void. |
uint32_t | XTAL frequency. |
Definition at line 1171 of file S2LP_Radio.c.
uint8_t S2LPRadioInit | ( | SRadioInit * | pxSRadioInitStruct | ) |
Initializes the S2LP analog and digital radio part according to the specified parameters in the pxSRadioInitStruct.
pxSRadioInitStruct | pointer to a SRadioInit structure that contains the configuration information for the analog radio part of S2LP. |
Error | code: 0=no error, 1=error during calibration of VCO. |
Definition at line 559 of file S2LP_Radio.c.
void S2LPRadioSetAutoRampingMode | ( | SFunctionalState | xNewState | ) |
Set the autoramping mode. If enabled:
xNewState | Set the autoramping mode. |
None. |
Definition at line 1290 of file S2LP_Radio.c.
void S2LPRadioSetChannel | ( | uint8_t | cChannel | ) |
Sets the channel number.
cChannel | the channel number. |
None. |
Definition at line 769 of file S2LP_Radio.c.
void S2LPRadioSetChannelBW | ( | uint32_t | lBandwidth | ) |
Set the channel filter bandwidth.
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 S2LPRadioGetChannelBW() API. |
None. |
Definition at line 1081 of file S2LP_Radio.c.
void S2LPRadioSetChannelSpace | ( | uint32_t | lChannelSpace | ) |
Set the channel space factor in channel space register. The channel spacing step is computed as F_Xo/32768.
fChannelSpace | the channel space expressed in Hz. |
None. |
Definition at line 875 of file S2LP_Radio.c.
void S2LPRadioSetDatarate | ( | uint32_t | lDatarate | ) |
Set the datarate.
fDatarate | datarate expressed in bps. This value shall be in the range [100 500000]. |
None. |
Definition at line 976 of file S2LP_Radio.c.
void S2LPRadioSetDigDiv | ( | SFunctionalState | xNewState | ) |
Set the digital divider .
xNewState | S_DISABLE to disable the digital divider and S_ENABLE to enable it. |
None. |
Definition at line 834 of file S2LP_Radio.c.
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.
lFBase | the base carrier frequency expressed in Hz as unsigned word. |
Error | code: 0=no error, 1=error during calibration of VCO. |
Definition at line 904 of file S2LP_Radio.c.
void S2LPRadioSetFrequencyDev | ( | uint32_t | lFDev | ) |
Set the frequency deviation.
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. |
None. |
Definition at line 1030 of file S2LP_Radio.c.
void S2LPRadioSetIsiEqualizationMode | ( | SIsiEqu | xSIsiMode | ) |
Set the ISI equalizer.
xSIsiMode | It can be one of the values of SIsiEqu. |
None. |
Definition at line 1482 of file S2LP_Radio.c.
void S2LPRadioSetManualRampingMode | ( | SFunctionalState | xNewState | ) |
Set the manual ramping mode.
xNewState | Set the manual ramping mode. |
None. |
Definition at line 1318 of file S2LP_Radio.c.
void S2LPRadioSetMaxPALevel | ( | SFunctionalState | xNewState | ) |
Set the MAX_DBM bit. This will allow to transmit at the maximum power.
xNewState | enable (S_ENABLE) to enable or disable (S_DISABLE) the max dBm. |
None. |
Definition at line 1182 of file S2LP_Radio.c.
void S2LPRadioSetModulation | ( | ModulationSelect | xModulation | ) |
Set the modulation type.
xModulation | modulation to set. This parameter shall be of type ModulationSelect . |
None. |
Definition at line 1127 of file S2LP_Radio.c.
void S2LPRadioSetPALeveldBm | ( | uint8_t | cIndex, |
int32_t | lPowerdBm | ||
) |
Sets a specific PA_LEVEL register, with a value given in dBm.
cIndex | PA_LEVEL to set. This parameter shall be in the range [0:7]. |
lPowerdBm | PA value to write expressed in dBm . Be sure that this values is in the correct range [-PA_LOWER_LIMIT: PA_UPPER_LIMIT] dBm. |
None. |
Definition at line 1207 of file S2LP_Radio.c.
void S2LPRadioSetPALevelMaxIndex | ( | uint8_t | cIndex | ) |
Sets a specific PA_LEVEL_MAX_INDEX.
cIndex | PA_LEVEL_MAX_INDEX to set. This parameter shall be in the range [0:7]. |
None |
Definition at line 1254 of file S2LP_Radio.c.
void S2LPRadioSetRefDiv | ( | SFunctionalState | xNewState | ) |
Set the reference divider value.
xNewState | : S_DISABLE to disable the reference divider and S_ENABLE to enable it. |
None. |
Definition at line 793 of file S2LP_Radio.c.
void S2LPRadioSetRxCalibVcoAmpWord | ( | uint8_t | value | ) |
Set calibration word of the aplitude in RX.
value | Value of the amplitude calibration word. |
None. |
Definition at line 1380 of file S2LP_Radio.c.
void S2LPRadioSetRxCalibVcoFreqWord | ( | uint8_t | value | ) |
Set calibration word of the frequency in RX.
value | Value of the frequency calibration word. |
None. |
Definition at line 1401 of file S2LP_Radio.c.
void S2LPRadioSetSynthWord | ( | uint32_t | lSynthWord | ) |
Sets the SYNTH registers.
lSynthWord | the synth word to write in the SYNTH[3:0] registers. |
None. |
Definition at line 733 of file S2LP_Radio.c.
void S2LPRadioSetTxCalibVcoAmpWord | ( | uint8_t | value | ) |
Set calibration word of the aplitude in TX.
value | Value of the amplitude calibration word. |
None. |
Definition at line 1369 of file S2LP_Radio.c.
void S2LPRadioSetTxCalibVcoFreqWord | ( | uint8_t | value | ) |
Set calibration word of the frequency in TX.
value | Value of the frequency calibration word. |
None. |
Definition at line 1391 of file S2LP_Radio.c.
void S2LPRadioSetXtalFrequency | ( | uint32_t | lXtalFrequency | ) |
Set the XTAL frequency.
uint32_t | XTAL frequency. |
void. |
Definition at line 1160 of file S2LP_Radio.c.
void S2LPRadioSymClkRecoverInit | ( | SSymClkRecInit * | xSSymClkRecInit | ) |
Clock recovery configuration.
xSSymClkRecInit | pointer to the clock recovery struct to be used to configure the algorithm. |
None. |
Definition at line 1514 of file S2LP_Radio.c.