discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] 3.0.3 libusrp bug with usrp_basic_rx::start/stop


From: Dave Gotwisner
Subject: [Discuss-gnuradio] 3.0.3 libusrp bug with usrp_basic_rx::start/stop
Date: Wed, 30 May 2007 11:29:42 -0700
User-agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)

The last thread I posted had indicated problems related to overruns.

The problem turns out that start/stop weren't consistent in how they started and stopped things in gnuradio-3.0.3. It worked out that roughly every 800000 samples in my test, we got an overrun (except if the total was before the first stop()).

The problem lies in the start order:
   d_ephandle->start() followed by set_rx_enable(true)

and the stop order of:
   d_ephandle->stop() followed by set_rx_enable(false).

To fix the problem, the calls in stop() had to be flipped.

Here's the patch:
*** usrp_basic.cc.orig  2007-05-30 10:30:10.000000000 +0000
--- usrp_basic.cc       2007-05-30 10:23:11.000000000 +0000
***************
*** 541,556 ****
--- 541,565 ----
 {
   bool ok = usrp_basic::stop();

+ #if 1
+   if (!set_rx_enable(false)){
+     fprintf (stderr, "usrp_basic_rx: set_rx_enable(false) failed\n");
+     usb_strerror ();
+     ok = false;
+   }
+ #endif
   if (!d_ephandle->stop()){
     fprintf (stderr, "usrp_basic_rx: failed to stop end point streaming");
     usb_strerror ();
     ok = false;
   }
+ #if 0
   if (!set_rx_enable(false)){
     fprintf (stderr, "usrp_basic_rx: set_rx_enable(false) failed\n");
     usb_strerror ();
     ok = false;
   }
+ #endif
   return false;
 }


   Dave




reply via email to

[Prev in Thread] Current Thread [Next in Thread]