libbladeRF  2.1.0-0.2018.10~rc1-2
Nuand bladeRF library
Macros

Description

Macros

#define BLADERF_SAMPLERATE_MIN   80000u
 
#define BLADERF_SAMPLERATE_REC_MAX   40000000u
 
#define BLADERF_BANDWIDTH_MIN   1500000u
 
#define BLADERF_BANDWIDTH_MAX   28000000u
 
#define BLADERF_FREQUENCY_MIN_XB200   0u
 
#define BLADERF_FREQUENCY_MIN   237500000u
 
#define BLADERF_FREQUENCY_MAX   3800000000u
 
#define BLADERF_FLASH_TOTAL_SIZE   (4 * 1024 * 1024)
 
#define BLADERF_FLASH_PAGE_SIZE   256
 
#define BLADERF_FLASH_EB_SIZE   (64 * 1024)
 
#define BLADERF_FLASH_NUM_PAGES   (BLADERF_FLASH_TOTAL_SIZE / BLADERF_FLASH_PAGE_SIZE)
 
#define BLADERF_FLASH_NUM_EBS   (BLADERF_FLASH_TOTAL_SIZE / BLADERF_FLASH_EB_SIZE)
 
#define BLADERF_FLASH_TO_PAGES(bytes)   ((bytes) / BLADERF_FLASH_PAGE_SIZE)
 
#define BLADERF_FLASH_TO_EB(bytes)   ((bytes) / BLADERF_FLASH_EB_SIZE)
 
#define BLADERF_FLASH_ADDR_FIRMWARE   0x00000000
 
#define BLADERF_FLASH_PAGE_FIRMWARE   (BLADERF_FLASH_TO_PAGES(BLADERF_FLASH_ADDR_FIRMWARE))
 
#define BLADERF_FLASH_EB_FIRMWARE   (BLADERF_FLASH_TO_EB(BLADERF_FLASH_ADDR_FIRMWARE))
 
#define BLADERF_FLASH_BYTE_LEN_FIRMWARE   0x00030000
 
#define BLADERF_FLASH_PAGE_LEN_FIRMWARE   (BLADERF_FLASH_TO_PAGES(BLADERF_FLASH_BYTE_LEN_FIRMWARE))
 
#define BLADERF_FLASH_EB_LEN_FIRMWARE   (BLADERF_FLASH_TO_EB(BLADERF_FLASH_BYTE_LEN_FIRMWARE))
 
#define BLADERF_FLASH_ADDR_CAL   0x00030000
 
#define BLADERF_FLASH_PAGE_CAL   (BLADERF_FLASH_TO_PAGES(BLADERF_FLASH_ADDR_CAL))
 
#define BLADERF_FLASH_EB_CAL   (BLADERF_FLASH_TO_EB(BLADERF_FLASH_ADDR_CAL))
 
#define BLADERF_FLASH_BYTE_LEN_CAL   0x100
 
#define BLADERF_FLASH_PAGE_LEN_CAL   (BLADERF_FLASH_TO_PAGES(FLASH_BYTE_LEN_CAL))
 
#define BLADERF_FLASH_EB_LEN_CAL   1
 
#define BLADERF_FLASH_ADDR_FPGA   0x00040000
 
#define BLADERF_FLASH_PAGE_FPGA   (BLADERF_FLASH_TO_PAGES(BLADERF_FLASH_ADDR_FPGA))
 
#define BLADERF_FLASH_EB_FPGA   (BLADERF_FLASH_TO_EB(BLADERF_FLASH_ADDR_FPGA))
 
#define BLADERF_FLASH_BYTE_LEN_FPGA   0x00370000
 
#define BLADERF_FLASH_EB_LEN_FPGA   (BLADERF_FLASH_TO_EB(BLADERF_FLASH_BYTE_LEN_FPGA))
 

Macro Definition Documentation

◆ BLADERF_BANDWIDTH_MAX

#define BLADERF_BANDWIDTH_MAX   28000000u

Maximum bandwidth, in Hz

Definition at line 58 of file bladeRF1.h.

◆ BLADERF_BANDWIDTH_MIN

#define BLADERF_BANDWIDTH_MIN   1500000u

Minimum bandwidth, in Hz

Definition at line 55 of file bladeRF1.h.

◆ BLADERF_FLASH_ADDR_CAL

#define BLADERF_FLASH_ADDR_CAL   0x00030000

Byte address of calibration data region

Definition at line 120 of file bladeRF1.h.

◆ BLADERF_FLASH_ADDR_FIRMWARE

#define BLADERF_FLASH_ADDR_FIRMWARE   0x00000000

Byte address of FX3 firmware

Definition at line 98 of file bladeRF1.h.

◆ BLADERF_FLASH_ADDR_FPGA

#define BLADERF_FLASH_ADDR_FPGA   0x00040000

Byte address of of the autoloaded FPGA and associated metadata.

The first page is allocated for metadata, and the FPGA bitstream resides in the following pages.

Definition at line 150 of file bladeRF1.h.

◆ BLADERF_FLASH_BYTE_LEN_CAL

#define BLADERF_FLASH_BYTE_LEN_CAL   0x100

Length of calibration data, in bytes

Definition at line 129 of file bladeRF1.h.

◆ BLADERF_FLASH_BYTE_LEN_FIRMWARE

#define BLADERF_FLASH_BYTE_LEN_FIRMWARE   0x00030000

Length of firmware region of flash, in bytes

Definition at line 109 of file bladeRF1.h.

◆ BLADERF_FLASH_BYTE_LEN_FPGA

#define BLADERF_FLASH_BYTE_LEN_FPGA   0x00370000

Length of entire FPGA region, including both metadata and bitstream.

Definition at line 160 of file bladeRF1.h.

◆ BLADERF_FLASH_EB_CAL

#define BLADERF_FLASH_EB_CAL   (BLADERF_FLASH_TO_EB(BLADERF_FLASH_ADDR_CAL))

Flash erase block where calibration data starts

Definition at line 126 of file bladeRF1.h.

◆ BLADERF_FLASH_EB_FIRMWARE

#define BLADERF_FLASH_EB_FIRMWARE   (BLADERF_FLASH_TO_EB(BLADERF_FLASH_ADDR_FIRMWARE))

Flash erase block where FX3 firmware starts

Definition at line 105 of file bladeRF1.h.

◆ BLADERF_FLASH_EB_FPGA

#define BLADERF_FLASH_EB_FPGA   (BLADERF_FLASH_TO_EB(BLADERF_FLASH_ADDR_FPGA))

Flash erase block where FPGA metadata and bitstream start

Definition at line 157 of file bladeRF1.h.

◆ BLADERF_FLASH_EB_LEN_CAL

#define BLADERF_FLASH_EB_LEN_CAL   1

Length of calibration data, in erase blocks.

This is a special case, as the entire remainder of the erase block is reserved for future calibration data use. When updating calibration data, the whole block will be erased, even though the current firmware only uses one page of it.

Definition at line 142 of file bladeRF1.h.

◆ BLADERF_FLASH_EB_LEN_FIRMWARE

#define BLADERF_FLASH_EB_LEN_FIRMWARE   (BLADERF_FLASH_TO_EB(BLADERF_FLASH_BYTE_LEN_FIRMWARE))

Length of firmware region of flash, in erase blocks

Definition at line 116 of file bladeRF1.h.

◆ BLADERF_FLASH_EB_LEN_FPGA

#define BLADERF_FLASH_EB_LEN_FPGA   (BLADERF_FLASH_TO_EB(BLADERF_FLASH_BYTE_LEN_FPGA))

Length of entire FPGA region, in units of erase blocks

Definition at line 163 of file bladeRF1.h.

◆ BLADERF_FLASH_EB_SIZE

#define BLADERF_FLASH_EB_SIZE   (64 * 1024)

SPI flash 64KiB erase block size, in bytes

Definition at line 82 of file bladeRF1.h.

◆ BLADERF_FLASH_NUM_EBS

#define BLADERF_FLASH_NUM_EBS   (BLADERF_FLASH_TOTAL_SIZE / BLADERF_FLASH_EB_SIZE)

Size of the SPI flash, in 64KiB erase blocks

Definition at line 89 of file bladeRF1.h.

◆ BLADERF_FLASH_NUM_PAGES

#define BLADERF_FLASH_NUM_PAGES   (BLADERF_FLASH_TOTAL_SIZE / BLADERF_FLASH_PAGE_SIZE)

Size of the SPI flash, in pages

Definition at line 85 of file bladeRF1.h.

◆ BLADERF_FLASH_PAGE_CAL

#define BLADERF_FLASH_PAGE_CAL   (BLADERF_FLASH_TO_PAGES(BLADERF_FLASH_ADDR_CAL))

Flash page where calibration data starts

Definition at line 123 of file bladeRF1.h.

◆ BLADERF_FLASH_PAGE_FIRMWARE

#define BLADERF_FLASH_PAGE_FIRMWARE   (BLADERF_FLASH_TO_PAGES(BLADERF_FLASH_ADDR_FIRMWARE))

Flash page where FX3 firmware starts

Definition at line 101 of file bladeRF1.h.

◆ BLADERF_FLASH_PAGE_FPGA

#define BLADERF_FLASH_PAGE_FPGA   (BLADERF_FLASH_TO_PAGES(BLADERF_FLASH_ADDR_FPGA))

Flash page where FPGA metadata and bitstream start

Definition at line 153 of file bladeRF1.h.

◆ BLADERF_FLASH_PAGE_LEN_CAL

#define BLADERF_FLASH_PAGE_LEN_CAL   (BLADERF_FLASH_TO_PAGES(FLASH_BYTE_LEN_CAL))

Length of calibration data, in pages

Definition at line 132 of file bladeRF1.h.

◆ BLADERF_FLASH_PAGE_LEN_FIRMWARE

#define BLADERF_FLASH_PAGE_LEN_FIRMWARE   (BLADERF_FLASH_TO_PAGES(BLADERF_FLASH_BYTE_LEN_FIRMWARE))

Length of firmware region of flash, in pages

Definition at line 112 of file bladeRF1.h.

◆ BLADERF_FLASH_PAGE_SIZE

#define BLADERF_FLASH_PAGE_SIZE   256

SPI flash page size, in bytes

Definition at line 79 of file bladeRF1.h.

◆ BLADERF_FLASH_TO_EB

#define BLADERF_FLASH_TO_EB (   bytes)    ((bytes) / BLADERF_FLASH_EB_SIZE)

Convert byte addresses to units of flash erase blocks

Definition at line 95 of file bladeRF1.h.

◆ BLADERF_FLASH_TO_PAGES

#define BLADERF_FLASH_TO_PAGES (   bytes)    ((bytes) / BLADERF_FLASH_PAGE_SIZE)

Convert byte addresses to units of flash pages

Definition at line 92 of file bladeRF1.h.

◆ BLADERF_FLASH_TOTAL_SIZE

#define BLADERF_FLASH_TOTAL_SIZE   (4 * 1024 * 1024)

Total size of bladeRF SPI flash, in bytes

Definition at line 76 of file bladeRF1.h.

◆ BLADERF_FREQUENCY_MAX

#define BLADERF_FREQUENCY_MAX   3800000000u

Maximum tunable frequency, in Hz

Definition at line 73 of file bladeRF1.h.

◆ BLADERF_FREQUENCY_MIN

#define BLADERF_FREQUENCY_MIN   237500000u

Minimum tunable frequency (without an XB-200 attached), in Hz

Definition at line 70 of file bladeRF1.h.

◆ BLADERF_FREQUENCY_MIN_XB200

#define BLADERF_FREQUENCY_MIN_XB200   0u

Minimum tunable frequency (with an XB-200 attached), in Hz.

While this value is the lowest permitted, note that the components on the XB-200 are only rated down to 50 MHz. Be aware that performance will likely degrade as you tune to lower frequencies.

Definition at line 67 of file bladeRF1.h.

◆ BLADERF_SAMPLERATE_MIN

#define BLADERF_SAMPLERATE_MIN   80000u

Minimum sample rate, in Hz

Definition at line 40 of file bladeRF1.h.

◆ BLADERF_SAMPLERATE_REC_MAX

#define BLADERF_SAMPLERATE_REC_MAX   40000000u

Maximum recommended sample rate, in Hz.

The max sample rate of the LMS6002D is 40 MHz, but this API allows for larger values to allow users to leverage FPGA customizations (e.g., to generate test samples or mux other data into the sample stream).

If you are not performing such customizations, treat this as the max allowed values.

Definition at line 52 of file bladeRF1.h.