myriadrf / LimeSDR-USB_GW

Altera Cyclone IV FPGA project for the USB 3.0 LimeSDR board
Apache License 2.0
98 stars 64 forks source link

TX streaming fails with version 18.06 #4

Closed daniestevez closed 6 years ago

daniestevez commented 6 years ago

The latest version of LimeSuite + FPGA GW + FX3 FW doesn't work for me in TX (RX works perfectly). For easy testing, I'm using the following Python script that uses SoapySDR to send samples to the LimeSDR-USB for TX.

#!/usr/bin/env python2

import SoapySDR
from SoapySDR import * #SOAPY_SDR_ constants
import numpy as np

sdr = SoapySDR.Device()

#apply settings
sdr.setSampleRate(SOAPY_SDR_TX, 0, 1e6)
sdr.setFrequency(SOAPY_SDR_TX, 0, 434e6)
sdr.setAntenna(SOAPY_SDR_TX, 0, 'BAND1')

#setup a stream (complex floats)
txStream = sdr.setupStream(SOAPY_SDR_TX, SOAPY_SDR_CF32, [0])
sdr.activateStream(txStream) #start streaming

#create a re-usable buffer for rx samples
N = 2**18
N = 1024
buff = np.zeros(N, dtype=np.complex64)
while True:
    sr = sdr.writeStream(txStream, [buff], N)
    print sr

The script starts running fine and we get

ret=1024, flags=0, timeNs=0

but after a very small time we start getting

ret=-1, flags=0, timeNs=0

for all calls to writeStream().

Other SDR softwares fail as well. For instance, when using GNU Radio through gr-osmosdr or through gr-limesdr, the LimeSDR sink quickly blocks and doesn't accept any new samples.

Testing combinations of older versions of LimeSuite, the FPGA GW and the FX3 FW I have determined the culprit to be version 18.06 of the FPGA GW (LimeSDR-USB_HW_1.4_r2.15.rbf). When downgrading the FPGA GW and FX3 FW to version 18.03, everything works fine, even with the master branch of LimeSuite. Also, everything works fine if I mix FPGA GW version 18.03 with FX3 FW version 18.06. I guess that the problem must be in FPGA GW version 18.06.

quentinmit commented 6 years ago

We're experiencing this as well. I posted about it on Discourse and was pointed at this issue.

This replicates even with basicTX distributed as part of LimeSuite. Unfortunately downgrading is not an option for us because we need the calibration fixes in 18.06 (and beyond) or our LimeSDR doesn't reliably RX calibrate. Nor is upgrading to USB 3.0 - we've tried that and it's unstable after a few minutes of RX streaming.