aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--host/usrp_e_utils/usrp-e-loopback.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/host/usrp_e_utils/usrp-e-loopback.cpp b/host/usrp_e_utils/usrp-e-loopback.cpp
index 5b1003440..6b5ebd55f 100644
--- a/host/usrp_e_utils/usrp-e-loopback.cpp
+++ b/host/usrp_e_utils/usrp-e-loopback.cpp
@@ -259,6 +259,15 @@ int main(int argc, char *argv[]){
//set the mode to loopback
poke16(E100_REG_MISC_XFER_RATE, (1<<8) | (1<<9));
+ //clear FIFO state in FPGA and kernel
+ poke32(E100_REG_CLEAR_RX, 0);
+ poke32(E100_REG_CLEAR_TX, 0);
+ ::close(fp);
+ if ((fp = ::open("/dev/usrp_e0", O_RDWR)) < 0){
+ std::cerr << "Open failed" << std::endl;
+ return -1;
+ }
+
//setup the ring buffer
setup_ring();