uhd: do not stop rx_stream when setting rx_rate for the B210

with the B210 and 2 RF ports, i.e. MIMO mode, we have stopped the
Rx stream after changing the rx_samp_rate but didn't start it again.

Either the issue doesn't exist in SISO mode or we never saw it but for MIMO
it can be reproduced easily with rate changes during streaming, i.e.:

$ ./lib/src/radio/test/benchmark_radio -p 2 -t 10 -x -y -s 23.04e6
Instantiating objects and allocating memory...
Initialising instances...
Opening 2 channels in RF device= with args=default
[INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; UHD_3.15.0.0-2build5
[INFO] [LOGGING] Fastpath logging disabled at runtime.
Opening USRP channels=2, args: type=b200,master_clock_rate=23.04e6
[INFO] [B200] Detected Device: B210
[INFO] [B200] Operating over USB 3.
[INFO] [B200] Initialize CODEC control...
[INFO] [B200] Initialize Radio control...
[INFO] [B200] Performing register loopback test...
[INFO] [B200] Register loopback test passed
[INFO] [B200] Performing register loopback test...
[INFO] [B200] Register loopback test passed
[INFO] [B200] Asking for clock rate 23.040000 MHz...
[INFO] [B200] Actually got clock rate 23.040000 MHz.
[INFO] [MULTI_USRP]     1) catch time transition at pps edge
[INFO] [MULTI_USRP]     2) set times next pps (synchronously)

Warning: TX gain was not set. Using open-loop power control (not working properly)

Setting manual TX/RX offset to 0 samples
Start capturing 10000 frames of 23040 samples...
Changing sampling rate to 23.04 Msamps/s
Setting manual TX/RX offset to 0 samples
Changing sampling rate to 1.92 Msamps/s
Setting manual TX/RX offset to 0 samples
/home/anpu/src/srsLTE/lib/src/phy/rf/rf_uhd_imp.cc.1211: Error timed out while receiving samples from UHD.

/home/anpu/src/srsLTE/lib/src/phy/rf/rf_uhd_imp.cc.1211: Error timed out while receiving samples from UHD.

/home/anpu/src/srsLTE/lib/src/phy/rf/rf_uhd_imp.cc.1211: Error timed out while receiving samples from UHD.

/home/anpu/src/srsLTE/lib/src/phy/rf/rf_uhd_imp.cc.1211: Error timed out while receiving samples from UHD.

/home/anpu/src/srsLTE/lib/src/phy/rf/rf_uhd_imp.cc.1211: Error timed out while receiving samples from UHD.
master
Andre Puschmann 4 years ago
parent 7253efe17e
commit 3f02e56a1e

@ -72,7 +72,15 @@ const std::set<std::string> RH_UHD_IMP_FIX_MASTER_CLOCK_RATE_DEVICE_LIST = {"x30
/**
* List of devices that do NOT support stream stop/start after a time out
*/
const std::set<std::string> RH_UHD_IMP_PROHIBITED_STOP_START = {DEVNAME_X300, DEVNAME_N300, DEVNAME_E3X0, DEVNAME_B200};
const std::set<std::string> RF_UHD_IMP_PROHIBITED_STREAM_REMAKE = {DEVNAME_X300,
DEVNAME_N300,
DEVNAME_E3X0,
DEVNAME_B200};
/**
* List of devices that do NOT require/support to restart streaming after rate changes/timeouts
*/
const std::set<std::string> RF_UHD_IMP_PROHIBITED_STOP_START = {DEVNAME_B200};
/**
* Defines a delay used between the current USRP time and the start of the transmission. This value needs to be high
@ -895,8 +903,10 @@ double rf_uhd_set_rx_srate(void* h, double freq)
}
// Stop RX streamer
if (rf_uhd_stop_rx_stream_unsafe(handler) != SRSLTE_SUCCESS) {
return SRSLTE_ERROR;
if (RF_UHD_IMP_PROHIBITED_STOP_START.count(handler->devname) == 0) {
if (rf_uhd_stop_rx_stream_unsafe(handler) != SRSLTE_SUCCESS) {
return SRSLTE_ERROR;
}
}
// Set master clock rate
@ -920,7 +930,7 @@ double rf_uhd_set_rx_srate(void* h, double freq)
return SRSLTE_ERROR;
}
if (RH_UHD_IMP_PROHIBITED_STOP_START.count(handler->devname) == 0) {
if (RF_UHD_IMP_PROHIBITED_STREAM_REMAKE.count(handler->devname) == 0) {
if (handler->uhd->get_rx_stream(handler->rx_nof_samples) != UHD_ERROR_NONE) {
print_usrp_error(handler);
return SRSLTE_ERROR;
@ -974,7 +984,7 @@ double rf_uhd_set_tx_srate(void* h, double freq)
return SRSLTE_ERROR;
}
if (RH_UHD_IMP_PROHIBITED_STOP_START.count(handler->devname) == 0) {
if (RF_UHD_IMP_PROHIBITED_STREAM_REMAKE.count(handler->devname) == 0) {
if (handler->uhd->get_tx_stream(handler->tx_nof_samples) != UHD_ERROR_NONE) {
print_usrp_error(handler);
return SRSLTE_ERROR;
@ -1208,7 +1218,7 @@ int rf_uhd_recv_with_time_multi(void* h,
} else if (error_code == uhd::rx_metadata_t::ERROR_CODE_TIMEOUT) {
ERROR("Error timed out while receiving samples from UHD.\n");
if (RH_UHD_IMP_PROHIBITED_STOP_START.count(handler->devname) == 0) {
if (RF_UHD_IMP_PROHIBITED_STOP_START.count(handler->devname) == 0) {
// Stop Rx stream
rf_uhd_stop_rx_stream_unsafe(handler);
}

Loading…
Cancel
Save