[USRP-users] B210 Re-tuning in rx_timed_samples causes timeout after fixed number of samples

Marcus D. Leech mleech at ripnet.com
Tue Jul 21 21:33:58 EDT 2015


On 07/21/2015 09:25 PM, Patrick Sathyanathan via USRP-users wrote:
> Hi,
>
> Ping... anyone know what the issue is and how to fix it ?
>
> Thanks,
>
> --Patrick
>
> > To: usrp-users at lists.ettus.com
> > Date: Sat, 18 Jul 2015 18:24:33 -0700
> > Subject: [USRP-users] B210 Re-tuning in rx_timed_samples causes 
> timeout after fixed number of samples
> > From: usrp-users at lists.ettus.com
> >
> > Hi,
> >
> > I modified the rx_timed_samples example to measure retuning time on 
> my B210. I added the following function to retune as in the UHD manual:
> >
> > void retune(uhd::usrp::multi_usrp::sptr usrp, double frequency)
> > {
> >   uhd::tune_request_t tune_req(frequency, 0);
> >   tune_req.args = uhd::device_addr_t("mode_n=integer");
> >   boost::timer my_timer;
> >   usrp->set_rx_freq(tune_req);
> >   while (not usrp->get_rx_sensor("lo_locked").to_bool()) {
> >     //sleep for a short time in milliseconds
> > boost::this_thread::sleep(boost::posix_time::milliseconds(10));
> >   }
> >   double lo_lock_time = my_timer.elapsed();
> >   printf("Retune to %g time = %g ms\n", frequency, lo_lock_time*1000);
> > }
> >
> > And before the while loop in the main function:
> >
> >     double frequency = 100e6;
> >     double increment = 16e6;
> >     retune(usrp, frequency);
> >     frequency += increment;
> >
> > and at the end of the while loop:
> >
> >         retune(usrp, frequency);
> >         frequency += increment;
> >
> > When I run the sample with: "rx_timed_samples --nsamps 10000000"
> > I get the following timeout error after exactly 80169 samples. The 
> last few lines of the output are:
> >
> > Received packet: 2044 samples, 1 full secs, 0.512107 frac secs
> > Retune to 7.08e+08 time = 1.021 ms
> > Received packet: 2044 samples, 1 full secs, 0.512434 frac secs
> > Retune to 7.24e+08 time = 1.315 ms
> > Received packet: 453 samples, 1 full secs, 0.512761 frac secs
> > Retune to 7.4e+08 time = 1.16 ms
> > OReceive timeout before all samples received...
> >
> > Done!
> >
> > This happens every time I run it after exactly the same number of 
> samples. I have tried increasing the timeout value to 0.3 from 0.1 but 
> that doesn't work.
> >
> > My UHD version is: linux; GNU C++ version 4.8.2; Boost_105400; 
> UHD_003.009.git-186-geb9cfef4
> >
> > What is going on and how can I fix it ?
> >
> > Thanks,
> >
> > --Patrick
> >
> >
> > _______________________________________________
When you say "at the end of the while loop", do you mean inside the 
while loop?

If you're adding delay inside the while-loop, that will eventually catch 
up with you, causing buffers to back up, and stuff to get lost.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20150721/3d50fbda/attachment-0002.html>


More information about the USRP-users mailing list