Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4906

Troubleshooting • Raspberry Pi 5 USB 3.0 read performance is worse than Raspberry Pi 4

$
0
0
I am using a Raspberry Pi 5 to receive I/Q samples from a Nuand bladeRF 2.0 micro SDR over USB 3.0. I had previously been using a Raspberry Pi 4 Model B. I am experiencing significantly lower performance with the Pi 5.

I am testing by running the following command using a utility provided by Nuand:

Code:

bladeRF-cli -e 'set samplerate 1M' -e 'set rx_mux 32BIT_COUNTER' -e 'rx config file=capture.sc16q11 format=bin channel=1,2' -e 'rx start' -e 'rx wait' -e 'rx'
This causes the bladeRF to stream back incrementing 32-bit integers instead of the usual I/Q. I then run a script to check for discontinuity in the integers. I increase the samplerate until I start seeing discontinuities, indicating that the bladeRF's USB interface was not serviced soon enough and its RX buffer overflowed.

On the Pi 4, I am able to achieve 40 Msps with a single discontinuity. On the Pi 5 I am only able to achieve 15 Msps with a single discontinuity. (Each sample is 4 bytes, so 40 Msps equates to about 1.28 Gbps, and 15 Msps equates to about 480 Mbps.) The fact that I'm seeing about 480 Mbps makes me think that it might be operating as USB 2.0, but

Code:

bladeRF-cli -e info
reports that the USB Speed is SuperSpeed. Also,

Code:

lsusb --tree
shows a speed of 5000M.

I have tried to make sure that the CPU always runs at its max frequency:

Code:

sudo sh -c 'echo performance > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor'
I have also tried disabling USB current limiting:

Code:

sudo raspi-config nonint do_usb_current 0
Also, based on https://github.com/raspberrypi/firmware/issues/1877, I tried setting the following registers:

Code:

sudo busybox devmem 0x1f0010970c 32 0x232c3000sudo busybox devmem 0x1f0020c108 32 0x22080000sudo busybox devmem 0x1f0030c108 32 0x22080000
None of these made a difference.

I am running Raspberry Pi OS 64-bit (bookworm). My EEPROM version is Wed 5 Jun 15:41:49 UTC 2024 (1717602109), which contains the fix for https://github.com/raspberrypi/firmware/issues/1877.

I am looking for suggestions as to how I might improve this performance, or at least how I might further troubleshoot it.

Statistics: Posted by Steve Ochs — Tue Aug 06, 2024 6:48 pm



Viewing all articles
Browse latest Browse all 4906

Trending Articles