From 87f69e9784d269fffbaa430726b4d31659034ae6 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sun, 28 Aug 2011 21:36:47 +0000 Subject: e100: add FIFO clear and kernel clear to loopback --- host/usrp_e_utils/usrp-e-loopback.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'host/usrp_e_utils/usrp-e-loopback.cpp') 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(); -- cgit v1.2.3