bladeRF icon indicating copy to clipboard operation
bladeRF copied to clipboard

Sample Rate is Halved When Using BLADERF_FEATURE_OVERSAMPLE

Open cwozny opened this issue 10 months ago • 0 comments

When using the new oversample feature, the sample rate seems to be effectively half of what gets set in bladerf_set_sample_rate(). This was tested by using a signal generator and feeding in a pulsed waveform with a 48 us duration. With oversample feature enabled, 8-bit resolution, and 50 Msps sampling rate, the pulse duration was incorrectly being measured as ~24 us. With default feature enabled, 8-bit resolution, and 50 Msps sample rate, the pulse duration was correctly being measured as ~48 us.

This was tested minutes apart and the only code delta was in this commit: https://github.com/cwozny/sdr_channelizer/commit/a36a758cb4c5a370b7851fd3c206c6b1297c71b8

I also tried to enable oversampling after setting the sampling rate due to an issue that @rthomp10 fixed with commit 86d68ee, but this didn't correct the sampling rate either.

Plots included for reference, note the time per division showing the pulse duration being halved when using oversampling.

default oversample

Board: Nuand bladeRF 2.0 (bladerf2) Serial #: xxxxxxxxxxxxxxxxxxxxxxxxxxxxx VCTCXO DAC calibration: 0x230b FPGA size: 77 KLE FPGA loaded: yes Flash size: 64 Mbit USB bus: 0 USB address: 1 USB speed: SuperSpeed Backend: libusb Instance: 0

bladeRF-cli version: 1.9.0-git-41ef6346 libbladeRF version: 2.5.0-git-41ef6346

Firmware version: 2.4.0-git-a3d5c55f FPGA version: 0.15.0

cwozny avatar Sep 13 '23 02:09 cwozny