Commit graph

2,470 commits

Author SHA1 Message Date
Ryan Thompson
2c2c4c1505 doc: bladeRF-cli: updated sample limit to match buffer limit 2025-02-27 17:36:05 -06:00
Ryan Thompson
71f9cd4e9f doc: updated buf size limit in examples and tests 2025-02-27 17:36:05 -06:00
Ryan Thompson
e6bbdd69cc libbladeRF: support and clamp byte alignment to larger GPIF buffer size
This change also includes a refactor of the redundant format to sample
size conversions found within the synchronous and asynchronous
interfaces.
2025-02-27 17:36:03 -06:00
Ryan Thompson
b0ed92eae8 fx3_firmware: increase DMA buffer sizes for USB throughput bottleneck
$ make test_hdl
[----------] Global test environment tear-down
[==========] 63 tests from 2 test suites ran. (381209 ms total)
[  PASSED  ] 63 tests.
[100%] Built target test_hdl
2025-01-16 14:45:20 -06:00
Ryan Thompson
efbebc8e88 libbladeRF: test: added streaming test
The streaming test allows for cross testing between MIMO, SISO, TX, RX, meta,
and non-meta configurations.

Example: TX a CW at 50MSPS and at a frequency of (915MHz+50MHz/16) with meta enabled
./output/libbladeRF_test_streaming -te -s 50M

Example: TX and RX at 25MSPS and at a frequency of (915MHz+25MHz/16) without meta enabled
./output/libbladeRF_test_streaming -tr -s 25M
2025-01-16 14:45:20 -06:00
Ryan Thompson
5daf75c84e doc: added packet length warning for BLADERF_FORMAT_PACKET_META
A packet length of (n*256-4) DWORDs will cause the synchronous
buffer it's filled into to indefinitely persist.
2025-01-16 14:41:24 -06:00
Ryan Thompson
6fac4cd672 doc: fix API sections menu item with Doxygen 1.9.8
The API sections aren't stored as modules anymore. They're topics.
Error likely introduced at doxygen commit: 6d80fc7e5
2025-01-16 13:45:31 -06:00
Ryan Thompson
179fe7c600 hdl: corrected bladeRF 1.0 FPGA version number 2025-01-06 13:36:48 -06:00
Asa Zernik
cbc3d30a27 libbladeRF: Return error code instead of asserting in version_check
Specifically, when there's a missing compat table entry. All callers
specify that they want to be forgiving of version mismatches, so this
seems in the spirit of the call tree.

Ran into this error when playing with a custom-loaded FPGA; if I had
flashed the FPGA instead of simply loading it, this could have bricked
the blade (or at least forced me into a very involved recovery process).
2024-08-13 11:43:21 +03:00
Ryan Thompson
26e91a550e libbladeRF: test: fix gain compare dev init 2024-08-10 18:20:33 -07:00
Ryan Thompson
e1a5c9260d libbladeRF: fix calibration load check for get_gain_calibration
Fixes #981
2024-08-10 18:16:51 -07:00
Ryan Thompson
d746811bd9 cmake: added Clang alternatives to compiler configurations 2024-08-10 18:16:51 -07:00
Ryan Thompson
f81b82aa8e libbladeRF: bump to version 2.5.1
Introduces bladeRF-power cli tool and gain calibration functionality.
2024-08-08 00:15:01 -05:00
Ryan Thompson
b98f385fb4 bladeRF-power: added sample rate assignment 2024-08-08 00:15:01 -05:00
Ryan Thompson
5f64e3f1c4 bladeRF-power: set test gain control to manual when TX 2024-08-07 15:35:55 -05:00
Ryan Thompson
94c08ebc9f bladeRF-power: added channel select 2024-08-07 15:35:55 -05:00
Ryan Thompson
68f396a102 bladeRF-power: added ascii text art for power measurements
█████╗    ███████╗       ██████╗     ██╗         ██████╗ ██████╗ ███╗   ███╗
           ██╔══██╗   ╚════██║       ╚════██╗   ███║         ██╔══██╗██╔══██╗████╗ ████║
███████╗   ╚██████║       ██╔╝        █████╔╝   ╚██║         ██║  ██║██████╔╝██╔████╔██║
            ╚═══██║      ██╔╝        ██╔═══╝     ██║         ██║  ██║██╔══██╗██║╚██╔╝██║
            █████╔╝     ██╔╝      ██╗███████╗    ██║         ██████╔╝██████╔╝██║ ╚═╝ ██║
            ╚════╝      ╚═╝       ╚═╝╚══════╝    ╚═╝         ╚═════╝ ╚═════╝ ╚═╝     ╚═╝
2024-08-07 15:35:55 -05:00
Ryan Thompson
818082947a bladeRF-power: cli: added stderr message viewer 2024-08-07 15:35:55 -05:00
Ryan Thompson
eff35dd799 bladeRF-power: cli: display warning if bladeRF-power window is too small
This actively checks if the window is too small and will provide a
warning when data is being hidden.
2024-08-07 15:35:55 -05:00
Ryan Thompson
d9be3348c3 bladeRF-power: cli: display calibration info when 'i' is pressed 2024-08-07 15:35:55 -05:00
Ryan Thompson
f370c2aef3 bladeRF-power: cli: rm module disable after stream
Closing the bladeRF after the module disable causes some usb interfaces
to fatally crash specifically for the TX interface.

discovery notes:
- Enable module and bladerf_close both call sync_deinit
- Mutex is destroyed in sync_deinit
2024-08-07 15:35:55 -05:00
Ryan Thompson
935ef43fb9 bladeRF-power: cli: added engineering notation suffix ingestion
This allows arguments to be specified with engineering notation.
E.g. bladeRF-power -f 4G
2024-08-07 15:35:55 -05:00
Ryan Thompson
8ec93c517c bladeRF-power: add FIR filter for power equalization across bandwidth
The FIR filter will equalize the noise figure across the bandwidth of
the bladeRF 2.0. After equalization, measurements of off-center CWs and
modulated waveforms are brought within +-1dB of error.
2024-08-07 15:35:55 -05:00
Ryan Thompson
b4e50ac1e4 bladeRF-power: added README.md and appended to utilities README.md 2024-08-07 15:35:55 -05:00
Ryan Thompson
3d350853b9 bladeRF-power: added install target 2024-08-07 15:35:55 -05:00
Ryan Thompson
64e709e885 bladeRF-power: init 2024-08-07 15:35:55 -05:00
Ryan Thompson
5e041d0ada libbladeRF: gain_calibration: added serial number to gain cal table
The gain calibration table will compare the serial number in the CSV
with the serial number of the opened device. A warning will be issued
if the serial numbers do not match.
2024-08-07 15:35:55 -05:00
Ryan Thompson
b185d4c60a libbladeRF: gain_calibration: added cal table valid entry check 2024-08-07 15:35:45 -05:00
Ryan Thompson
125d96f4b1 libbladeRF: gain_calibration: restore gain mode after cal load 2024-08-07 15:32:31 -05:00
Ryan Thompson
2ab7adc676 libbladeRF: gain_calibration: added header check for CSV conversions
This blocks RX gain calibrations from being applied to TX and
vice versa.
2024-08-07 15:31:54 -05:00
Ryan Thompson
3c25f57893 libbladeRF: gain_calibration: added bladerf_get_gain_target
The gain target is either set or calculated based on the gain mode. If
using manual gain control, the gain target from the gain table is
returned. If the AGC is enabled, the gain target is calculated based
on the current gain.
2024-08-07 15:31:54 -05:00
Ryan Thompson
3cef03a0ce libbladeRF: gain_calibration: reassign gain after loading calibration
This ensures the calibration is enabled once the calibration is loaded.
Since gain calibration relies on top level call to set the gain,
bladerf_set_gain(), we have to unlock the mutex and call said function.
2024-08-07 15:31:52 -05:00
Ryan Thompson
b5cfb5b036 libbladeRF: gain_calibration: added null check and gain cal loaded check 2024-08-07 15:19:06 -05:00
Ryan Thompson
eb78b981bd libbladeRF: gain_calibration: added free gain table function 2024-08-07 15:19:06 -05:00
Ryan Thompson
8031b84e59 libbladeRF: gain_calibration: store gain cal file within table 2024-08-07 15:19:06 -05:00
Ryan Thompson
a83272d452 libbladeRF: gain_calibration: added gain cal auto loading support
If the the file location is not specified, using a NULL file location,
then try loading the expected default file name from one of the
find_file locations.

The test renames the files to the default serial based file names and
stores them alongside the binary (one of the find_file locations).
2024-08-07 15:19:06 -05:00
Ryan Thompson
d2579486ce libbladeRF: gain_calibration: added table version check
Gain calibration tables will be denoted with the GAIN_CAL_VERSION macro
defined at the top of device_calibration.c.
2024-08-07 15:19:06 -05:00
Ryan Thompson
361646af41 libbladeRF: test: added gain calibration test to regression test 2024-08-07 15:19:06 -05:00
Ryan Thompson
dbf50d88d0 libbladeRF: gain_calibration: added RX test sweep 2024-08-07 15:19:06 -05:00
Ryan Thompson
b35052dfd7 libbladeRF: gain_calibration: CSV to bladeRF image binary
This changes the method of storing the binary data. Rather than a naive
CSV save, we package the binary in a bladeRF image format containing
metadata along with the power vs. frequency data.
2024-08-07 15:19:06 -05:00
Ryan Thompson
aab04e0a2b libbladeRF: image: print type with metadata
Ex:
Magic: bladeRF
Type: Raw Data
Version: 0.1.0
Timestamp: 655e530f
Serial: 
Address: 0
Length: 0
2024-08-07 15:19:06 -05:00
Ryan Thompson
eb3d128a8d libbladeRF: image: bladerf_image_print_metadata added
Ex:
Magic: bladeRF
Version: 0.1.0
Timestamp: 655e530f
Serial: 
Address: 0
Length: 0
2024-08-07 15:19:06 -05:00
Ryan Thompson
986c3a3353 libbladeRF: gain_calibration: added gain calibration image type 2024-08-07 15:19:06 -05:00
Ryan Thompson
ce634ef649 libbladeRF: gain_calibration: CSV additional parameters supported
The CSV import supports the added parameters and cross test for gain
and channel combinations.
2024-08-07 15:19:06 -05:00
Ryan Thompson
00346bba68 libbladeRF: gain_calibration: new example gain calibration CSVs 2024-08-07 15:19:06 -05:00
Ryan Thompson
afae6bde20 libbladeRF: gain_calibration: free table entries on bladerf_close() 2024-08-07 15:19:06 -05:00
Ryan Thompson
cb9dc300b1 libbladeRF: gain_calibration: gain corr set by bladerf_set_gain() 2024-08-07 15:19:06 -05:00
Ryan Thompson
e94f3c7378 libbladeRF: gain_calibration: gain correction implementation
Initially administered through frequency assignment.
2024-08-07 15:19:06 -05:00
Ryan Thompson
9fb9b19f42 libbladeRF: gain_calibration: added bladerf_get_gain_calibration 2024-08-07 15:19:06 -05:00
Ryan Thompson
d83fd7777d libbladeRF: gain_calibration: check and round macros for gain cal fns 2024-08-07 15:19:06 -05:00