Underruns on bladerf_schedule_retune

Having issues with the site, hardware, source code, or any other issues?
Post Reply
John Dalton
Posts: 1
Joined: Wed Mar 10, 2021 1:26 pm

Underruns on bladerf_schedule_retune

Post by John Dalton »

Hi,

I'm running a system with the following configuration:
* BladeRF Micro V2.0 xA4
* single channel receiver (ch 0).
* Sample rate 30.72 Msps
* Hardware interface: USB 3
* Synchronous software interface using bladerf_sync_rx(), called every 0.5ms.
* A minimal 'toy' C++ application running on an i7 processor.

If I run the above there are no problems.

I now add a bladerf_schedule_retune() call every 5ms, using previously saved quick tune parameters. Every time the bladerf_schedule_retune() is called the next bladerf_sync_rx() returns an underrun error. If I reduce the sample rate the number of underrun errors reduces, becoming essentially zero at a sample rate of 20Msps.

At 30.72Msps, usbtop is showing 555kbps to the device and 122500kbps from the device. Removing the scheduled retunes reduces the data to the device to 475kbps. Doubling the sample rate to 61.44Msps results in 960Mbps to the device and 245000kbps from the device, with occasional underruns. This suggests that the USB3 bus isn't saturating at 30.72Msps, so the underruns are most likely due to bugs / timing problems?

Based on others' experience, should the bladeRF be able to handle the above USB traffic at a sample rate of 30.72Msps without problems? Am I bumping up against a fundamental limitation of the bladeRF, or should I be looking for bugs in my code or the bladeRF subsystem?

Problem solved? I changed the configuration of the bladeRF to:
samples_per_buffer = 8192;
num_buffers = 32;
num_transfers = 16;
Underruns now seem to have gone. I'll leave this here in case it is useful for anyone else.

Thanks.
Post Reply