libbladeRF  1.7.2
Nuand bladeRF library
Macros | Enumerations | Functions
Bandwidth configuration

Description

This section defines functionality for configuring the device's LPF bandwidth. In most cases, one should define the bandwidth to be less than the sample rate to minimize the impact of aliases.

To determine the required bandwidth setting for a desired sample rate (or vice versa), review the TX/RX LPF amplitude response plots in the LMS6002D datasheet. (This was Figure 6 as of datasheet v1.2r0.)

These functions are thread-safe.

Macros

#define BLADERF_BANDWIDTH_MIN   1500000u
 
#define BLADERF_BANDWIDTH_MAX   28000000u
 

Enumerations

enum  bladerf_lpf_mode { BLADERF_LPF_NORMAL, BLADERF_LPF_BYPASSED, BLADERF_LPF_DISABLED }
 

Functions

API_EXPORT int CALL_CONV bladerf_set_bandwidth (struct bladerf *dev, bladerf_module module, unsigned int bandwidth, unsigned int *actual)
 
API_EXPORT int CALL_CONV bladerf_get_bandwidth (struct bladerf *dev, bladerf_module module, unsigned int *bandwidth)
 
API_EXPORT int CALL_CONV bladerf_set_lpf_mode (struct bladerf *dev, bladerf_module module, bladerf_lpf_mode mode)
 
API_EXPORT int CALL_CONV bladerf_get_lpf_mode (struct bladerf *dev, bladerf_module module, bladerf_lpf_mode *mode)
 

Macro Definition Documentation

#define BLADERF_BANDWIDTH_MAX   28000000u

Maximum bandwidth, in Hz

Definition at line 948 of file libbladeRF.h.

#define BLADERF_BANDWIDTH_MIN   1500000u

Minimum bandwidth, in Hz

Definition at line 945 of file libbladeRF.h.

Enumeration Type Documentation

Low-Pass Filter (LPF) mode

Enumerator
BLADERF_LPF_NORMAL 

LPF connected and enabled

BLADERF_LPF_BYPASSED 

LPF bypassed

BLADERF_LPF_DISABLED 

LPF disabled

Definition at line 953 of file libbladeRF.h.

Function Documentation

API_EXPORT int CALL_CONV bladerf_get_bandwidth ( struct bladerf *  dev,
bladerf_module  module,
unsigned int *  bandwidth 
)

Get the bandwidth of the LMS LPF

Parameters
devDevice Handle
moduleModule for bandwidth request
bandwidthActual bandwidth in Hz
Returns
0 on success, value from Error codes list on failure
API_EXPORT int CALL_CONV bladerf_get_lpf_mode ( struct bladerf *  dev,
bladerf_module  module,
bladerf_lpf_mode mode 
)

Get the current mode of the LMS LPF

Parameters
devDevice handle
moduleModule for mode request
modeCurrent mode of the LPF
Returns
0 on success, value from Error codes list on failure
API_EXPORT int CALL_CONV bladerf_set_bandwidth ( struct bladerf *  dev,
bladerf_module  module,
unsigned int  bandwidth,
unsigned int *  actual 
)

Set the bandwidth of the LMS LPF to specified value in Hz

The underlying device is capable of a discrete set of bandwidth values. The caller should check the actual parameter to determine which of these discrete bandwidth values is actually used for the requested bandwidth.

Values outside the range of [ BLADERF_BANDWIDTH_MIN, BLADERF_BANDWIDTH_MAX ] will be clamped.

Parameters
[in]devDevice handle
[in]moduleModule for bandwidth request
[in]bandwidthDesired bandwidth
[out]actualIf non-NULL, written with the actual bandwidth that the device was able to achieve.
Returns
0 on success, value from Error codes list on failure
API_EXPORT int CALL_CONV bladerf_set_lpf_mode ( struct bladerf *  dev,
bladerf_module  module,
bladerf_lpf_mode  mode 
)

Set the LMS LPF mode to bypass or disable it

Parameters
devDevice handle
moduleModule for mode request
modeMode to be set
Returns
0 on success, value from Error codes list on failure