Commit graph

1,092 commits

Author SHA1 Message Date
Robert Ghilduta
b1ab659d6d libbladeRF: replace pthreadswin32 with native threading and locking API on Windows 2023-12-04 01:15:59 -08:00
Ryan Thompson
bfabd63566 libbladeRF: fix assignment between very fast and very slow sample rates
Failure info:
Failed going from 48,601,811 -> 1,228,911 MSPS.
Worked when first sample rate is < 40,000,001 MSPS.
Worked when the subsequent sample rate is > 2,083,334 MSPS.

ad9361_validate_enable_fir: Invalid: ratio ADC/2 / TX_SAMPL * 16 > TAPS(max 64, adc 388814480, tx 48601810)
[ERROR @ host/libraries/libbladeRF/src/board/bladerf2/rfic_host.c:888] _rfic_host_set_filter: ad9361_set_tx_fir_en_dis(phy, enable) failed: An unexpected error occurred
[ERROR @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:1100] bladerf2_set_sample_rate: could not set TX filter mode: An unexpected error occurred
2023-10-31 11:00:36 -05:00
Ryan Thompson
bfd82bfcca hdl: FPGA patch update v0.15.3 2023-10-31 10:28:21 -05:00
Ryan Thompson
199eac6e5c libbladeRF: get_samplerate_range returns range of current feature
It makes more sense to return a valid sample rate range in the current
state rather than a potential range.
2023-09-27 16:38:57 -05:00
Ryan Thompson
874d83a79f libbladeRF: bladerf_init_stream() timeout and dropped data warning 2023-09-27 16:38:56 -05:00
Ryan Thompson
93cec5db53 test: async invalid parameters errors log as error 2023-09-27 16:38:56 -05:00
Robert Ghilduta
9fc57e6c7f libbladeRF: fix typo in sync_tx 2023-09-19 13:23:32 -07:00
Ryan Thompson
86d68eedfd libbladeRF: oversample register config set with bladerf_set_sample_rate 2023-08-25 14:40:01 -05:00
Ryan Thompson
452ba280ba host: rm unused variables
Resolves errors thrown by AppleClang 14.0.3.14030022.
2023-08-15 12:11:58 -05:00
Ryan Thompson
3c32966434 libbladeRF: sync_rx: # of enabled channels must divide into num_samples
Otherwise the buffer alignment would flip flop every other sync call.
2023-07-07 15:44:14 -05:00
Ryan Thompson
475e4596a8 libbladeRF: sync.c: seek within message based on remaining timestamp
Seek within message needed a timestamp based trigger for when MIMO
is enabled.
2023-07-07 15:44:14 -05:00
Ryan Thompson
6ccf082ccf libbladeRF: sync.c: target timestamp calculation refactor 2023-07-07 15:44:14 -05:00
Ryan Thompson
78ac28ceaf libbladeRF: invalid buffer sizes will now be understood in the log 2023-07-07 15:44:14 -05:00
Ryan Thompson
99979934d5 libbladeRF: corrected message-in-buffer calculation
Support
+ 8bit MIMO
+ 8bit SISO
+ 16bit MIMO
+ 16bit SISO
2023-07-07 15:44:14 -05:00
Ryan Thompson
e60687033c libbladeRF: enable both RX/TX channels when layout is MIMO
The rfic_host now checks the stream_config for the channel_layout. If
RX or TX directions are configured for MIMO operation, both respective
channels will be enabled regardless of what channel is passed to
bladerf_enable_module.
2023-07-07 15:44:14 -05:00
Ryan Thompson
3e90784670 hdl: FPGA patch update v0.15.2
Corrects RX timestamp when MIMO enabled.
2023-06-26 13:37:36 -05:00
Ryan Thompson
c123d8398e libbladeRF: oversample gain restrictions removed
Gain assignments with the oversample feature enabled has been
stabilized across the entire gain range in the previous commit.
2023-06-08 08:49:01 -05:00
Ryan Thompson
01a8d0e8ce libbladeRF: gain assignments stabilized for oversample feature
Fixes #902
2023-06-08 08:49:01 -05:00
Ryan Thompson
7ec824fbbd libbladeRF: oversample register config moved to function 2023-06-08 08:49:01 -05:00
Ryan Thompson
c424eae9e6 libbladeRF: lower bound set for oversample gain 2023-06-07 12:38:05 -05:00
Ryan Thompson
48763b01c3 libbladeRF: oversample feature gain > 39 permitted
Still having problems from [12:38]. Starting from 39, spectrum operates
as expected.
2023-06-05 14:36:09 -05:00
Ryan Thompson
dfd8549d74 libbladeRF: bandwidth assignments in oversample mode issue log warning
Fixes #920
2023-06-05 13:44:25 -05:00
Ryan Thompson
368f0ac9e8 libbladeRF: FPGA load timeout increase
The longer timeout accommodates longer interface enable times. A test
script has been provided in case custom timeouts have been added
to usb.c.
2023-05-16 11:40:01 -05:00
Ryan Thompson
86410e2721 hdl: FPGA patch update v0.15.1
+ 8bit RX timestamp correction
+ 8bit support signal_generator.vhd
2023-05-11 16:44:28 -05:00
Mike Ryan
2b90ed3976 libbladerf: correctly report num_samples for SC8_Q7 in async api
The async API has two codepaths for reporting samples to a user-provided
callback depending on whether packet metadata is requested. In the path
where it is requested, the code correctly uses bytes_to_samples() to
report num_samples. In the path where no metadata is requested, the code
uses the previously hardcoded call to bytes_to_sc16q11(), which
underreports num_samples by half for SC8_Q7 format samples. This appears
to have been an oversight, and this patch corrects the non-metadata path
to match the metadata path.
2023-04-11 03:18:16 -07:00
Ryan Thompson
4b9f9db756 Revert "libbladeRF: issue#913 SW workaround"
This reverts commit 447fc3da7bfeb98e190fa1bcebc36ca7e48b6dfc.
2023-03-31 17:18:01 -05:00
Ryan Thompson
4851a104cf libbladeRF: issue#913 SW workaround
The timestamp increment pattern has been discovered. The fix will
ultimately requires an HDL change.
2023-03-31 17:18:01 -05:00
Ryan Thompson
26d381a52b libbladeRF: sync_rx: SC8_Q7_META in meta and target timestamp init 2023-03-31 17:18:01 -05:00
Ryan Thompson
7825ae5c5e libbladeRF: changed xb200 quick tune param recommendation
XB-200 quick tune parameter recommendation now considered log info rather 
than an error.

Fix #882
2023-03-31 17:18:01 -05:00
Robert Ghilduta
2caac5afd5 libbladeRF: make FPGA loading optional
Some config options require the FPGA to be loaded and initialized. However
config options are set in bladerf_open(). Attempting to set such config options
should not block bladerf_open() from completing.
2023-02-28 03:27:47 -08:00
Josef Gajdusek
0e0102898a libbladeRF: Fix correction setting on bladerf2
The TXA output of the AD9361 is actually the high-frequency one
(and the table of correction registers reflects this).
2023-02-27 23:49:27 -08:00
Robert Ghilduta
41ef634609 Revert "libbladeRF: update compatibility for FPGA v0.15.0 from libbladeRF 2.4.0 to 2.5.0"
This reverts commit 0c9b7dfd83.
2023-02-14 00:56:56 -08:00
Robert Ghilduta
0c9b7dfd83 libbladeRF: update compatibility for FPGA v0.15.0 from libbladeRF 2.4.0 to 2.5.0 2023-02-13 03:28:19 -08:00
Robert Ghilduta
df5b47e651 libbladeRF: rename bladerf_set_feature to bladerf_enable_feature 2023-02-13 03:28:19 -08:00
Ryan Thompson
ce979043b6 libbladeRF: oversample TX bandwidth limit extened
The TX bandwidth was previously constrained to 1/2 BW with the
oversample feature enabled. Now it reaches the whole bandwidth.
2023-02-13 03:28:19 -08:00
Ryan Thompson
a9d7824595 libbladeRF: 8bit format block for non-bladeRF 2.0 devices 2023-02-13 03:28:19 -08:00
Ryan Thompson
2291113eb1 libbladeRF: oversample gain limit implemented
It seems like the ad9361 resets the sample rate OC if the gain val > 11.
2023-02-13 03:28:19 -08:00
Ryan Thompson
8b47973dda libbladeRF: set feature blocks unsupported boards 2023-02-13 03:28:19 -08:00
Ryan Thompson
a37f40045e libbladeRF: BLADERF_FEATURE prefix prepended to feature names 2023-02-13 03:28:19 -08:00
Ryan Thompson
58bed4a3f3 libbladeRF: sync stream blocks 16bit format with OVERSAMPLE enabled 2023-02-13 03:28:19 -08:00
Ryan Thompson
28f3c7afb6 libbladeRF: get samplerate OC compensation move to libbladeRF
libbladeRF now doubles the returned sample rate when OVERSAMPLE feature
is enabled. This is necessary as the AD9361 is not self aware of its
overclock but libbladeRF is.
2023-02-13 03:28:19 -08:00
Ryan Thompson
da14b08f5c libbladeRF: OVERSAMPLE and DEFAULT sample rate guards implemented
Setting the sample rate will now check with the currently enabled 
feature. It tests if the sample rate is possible like before
and then checks if the currently enabled feature allows it.
2023-02-13 03:28:19 -08:00
Ryan Thompson
8903adb0ea libbladeRF: set samplerate OC compensation moved to libbladeRF
libbladeRF now halves the sent sample rate when OVERSAMPLE feature
is enabled. This is necessary as the AD9361 is not self aware of its
overclock but libbladeRF is.
2023-02-13 03:28:19 -08:00
Ryan Thompson
86a4cda5bd libbladeRF: AD9361 OC moved to libbladeRF
AD9361 OC moved from bladeRF-cli to libbladeRF
2023-02-13 03:28:19 -08:00
Ryan Thompson
eb1e7ed7e2 libbladeRF: feature set/get added to board 2023-02-13 03:28:19 -08:00
Ryan Thompson
711a1055b8 libbladeRF: carriage return included in libusb errors 2023-02-13 03:28:19 -08:00
Robert Ghilduta
bed0a3b8fb libbladeRF: add missing sc8 <-> sample conversion 2023-02-13 03:28:19 -08:00
Ryan Thompson
cf32dd6516 libbladeRF: synchronous stream accepts 8bit format
Although it is recognized, we're running into a segmentation fault because of it.
2023-02-13 03:28:19 -08:00
Ryan Thompson
aa3717a2af hdl: FPGA version update v0.15.0
FPGA version updated to v0.15.0 to represent the addition of 8bit mode.
2023-02-13 03:28:19 -08:00
Ryan Thompson
5b4f3cbbf8 libbladeRF: 8bit fpga version check implemented
async.c and sync.c throw an error if 8bit mode is detected with an fpga
version < 0.15.0
2023-02-13 03:28:19 -08:00