USRP Software Radio

cancel
Showing results for 
Search instead for 
Did you mean: 

B200 Rapid Frequency Changing Failure

I am using GNU Radio to continually change between a set of frequencies every 10ms.  I know that the B200 can do this as it only takes ~ 3ms to change freq and there is less than 1ms of data to transmit.  Even with the cost of getting through the GNU Radio flow graph I've still got several ms to spare.  The trouble is, the whole thing comes crumbling down after about a minute or two.  I did some testing and found that after the 3600th frequency change, tuning stops working.  The B200 responds back and all seems well, but it's actually not changing frequency.  In GNU Radio this manifests itself as a whole lot of L's being output.  To eliminate the possiblity that my flow graph and custom GNU Radio modules were to blame, I created the C++ code below.  One other thing that I noticed was that over time (up to the 3600th change), freq changes take longer and longer.  You can see this pretty easily by just running top and watching the CPU usage slowly go up.  I also tried adding a 10 second sleep after the 1800th iteration to see if it was just a buffer that needed to flush out.  Still borked out after 3600.

 

Anyone know why this is happening?  I assumed there might be a buffer somewhere that I am overflowing, but I couldn't find anything definitive.

 

EDIT: I should have mentioned that I am using the newest UHD from GitHub.

 

My output looks like this (cut to show the 3600 mark):

 

count:3596
time:0.00634687
count:3597
time:0.00626769
count:3598
time:0.00692431
count:3599
time:0.00590456
count:3600
time:0.00129256
count:3601
time:0.00105713
count:3602
time:0.00112481
count:3603
time:0.00101894
count:3604
time:0.0010365

 

#include <iostream>
#include <uhd/usrp/multi_usrp.hpp>
#include <unistd.h>

int main(){

    std::string args;
    uhd::usrp::multi_usrp::sptr usrp = uhd::usrp::multi_usrp::make(args);

    for(int a = 0; a < 4000; a++){
        uhd::tune_request_t tune_req = uhd::tune_request_t(800e6 + (a * 1e6), 0);
        tune_req.dsp_freq_policy = uhd::tune_request_t::POLICY_NONE;
        tune_req.rf_freq_policy = uhd::tune_request_t::POLICY_AUTO;
        double start = usrp->get_time_now().get_real_secs();
        usrp->set_tx_freq(tune_req, 0);
        std::cout << "time:" << (usrp->get_time_now().get_real_secs() - start) << std::endl;
        std::cout << "count:" << a << std::endl;
        usleep(20000);
    }


    return 1;
}

Thank you!

 

-David

0 Kudos
Message 1 of 2
(3,709 Views)

Hello David

 

Since you are using GNU Radio and the Ettus B200 you may want to post on Ettus' support mailing list as well. There is a specific GNU Radio mailing list which may have good insight into this issue.

 

http://www.ettus.com/support

Brian H. -- Electronics & Measurements Product Marketing Manager
0 Kudos
Message 2 of 2
(3,673 Views)