Commit graph

1,788 commits

Author SHA1 Message Date
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
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
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
Ryan Thompson
228de95650 libbladeRF: gain_calibration: print function added 2024-08-07 15:19:06 -05:00
Ryan Thompson
9cd7ab7d38 libbladeRF: gain_calibration: normalize correction values
TX=0dBm and RX=-30dBm are measurement targets set by the calibration
setup. These values are not to be changed unless the test measurement
setup has changed.
2024-08-07 15:19:06 -05:00
Ryan Thompson
cdaaa3d915 libbladeRF: gain_calibration: set gain target on load, set_gain, and en 2024-08-07 15:19:06 -05:00
Ryan Thompson
50dd427e49 libbladeRF: gain_calibration: enable function added 2024-08-06 18:47:45 -05:00
Ryan Thompson
b51057d774 libbladeRF: gain_calibration: load gain implementation
+ Automatic csv to bin file conversion
+ Gain tables for each channel
2024-08-06 18:47:45 -05:00
Ryan Thompson
838c177eba libbladeRF: gain_calibration: load function initialized 2024-08-06 18:47:45 -05:00
Ryan Thompson
f41966dcf8 libbladeRF: gain_calibration: example sweeps added 2024-08-06 18:47:45 -05:00
Ryan Thompson
3583aaca8e libbladeRF: gain_calibration: init
Adds the gain calibration tables along with the prototype for
bladerf_load_gain_calibration(). Also copies the stored calibration
references to the output directory.
2024-08-06 18:47:45 -05:00
Ryan Thompson
f8b7de8539 libbladeRF: do not enforce flash byte alignment for placeholder image 2024-08-06 18:47:45 -05:00
Ryan Thompson
fcfd174ca8 libbladeRF: added CHECK_STATUS_GOTO macro for bladerf2 board 2024-08-06 18:47:44 -05:00
Ryan Thompson
1d3fabfe6b libbladeRF: added save_fastlock_profile() to rfic struct 2024-08-06 18:47:44 -05:00
Ryan Thompson
02196a2e9b libbladeRF: bladerf_sync_tx: null check for TX samples
"Invalid operation or parameter" was the bladeRF error code returned
when samples were unallocated. Now, a log error is triggered saying
"bladerf_sync_tx: samples is null" and the return value is a bladeRF
memory error.
2024-08-06 18:47:44 -05:00
Ryan Thompson
ca68dfdb82 libbladeRF: automatically set manual gain control if gain is set 2024-08-06 18:47:44 -05:00
Ryan Thompson
452af25b50 libbladeRF: examples: frequency range sweep 2024-08-06 18:47:44 -05:00
Ryan Thompson
11adedda2e libbladeRF: added CHECK_STATUS macro to bladeRF.c 2024-08-06 18:47:44 -05:00