On 03/30/2020 11:19 AM, Sam Reiter via USRP-users wrote:
Ryan,

In that example, line 93 sets the USRP's internal sense of time to 0.0s, after which point this sense of time ticks up. Any timed commands you issue to the USRP need to occur in the future, relative to the USRP's sense of time. In this case, you have to give a "--secs" value greater than 0.0 + the latency for the stream command to be processed and sent to the radio over Ethernet (probably hundreds of microseconds).

As far as initialization of timespec, I'm not sure what it should initialize to by default. But for the intermittent, race-condition-esque behavior you're describing, it couldn't hurt to set all of those times explicitly.

-Sam
Local variables aren't explicitly initialized to anything in particular, at least in C, and as I recall, C++ as well. Since they reside on the stack,
  they'll have whatever in them unless explicitly initialized.



On Mon, Mar 30, 2020 at 9:37 AM Carmichael, Ryan <[email protected] <mailto:[email protected]>> wrote:

    *From:*Sam Reiter <[email protected]
    <mailto:[email protected]>>
    *Sent:* Sunday, March 29, 2020 1:15 PM
    *To:* Carmichael, Ryan <[email protected]
    <mailto:[email protected]>>
    *Cc:* [email protected] <mailto:[email protected]>
    *Subject:* [EXTERNAL] Re: [USRP-users] X310 UHD 3.15 Lockups

    I would suspect that your setting of the time_spec with an
    uninitialized value could be a problem. rx_multi_samples sets up
    multi-channel RX with an initialized time_spec:

    
https://github.com/EttusResearch/uhd/blob/UHD-3.15.LTS/host/examples/rx_multi_samples.cpp

    Can you compile and run that example on 3.15?

    -Sam

    Sam,

    Thanks for the suggestion. time_spec uninitialized takes the
    default of zero, right?

    If I run rx_multi_samples with --secs 0, I get an error “Error:
    Receiver error ERROR_CODE_LATE_COMMAND”, which we aren’t seeing in
    our usage (instead we just see it never return).

    If I run rx_multi_samples with another value (like --secs 0.1) it
    works fine.

    But the code I showed works 99.9% of the time. But when we run it
    for hours on end, it eventually locks up. I can try running
    rx_multi_samples with a very large --nsamps but that testing will
    take a while.

    Thanks,

    Ryan

    /
    ------------------------------------------------------------------------

    The information contained in this message, and any attachments,
    may contain privileged and/or proprietary information that is
    intended solely for the person or entity to which it is addressed.
    Moreover, it may contain export restricted technical data
    controlled by Export Administration Regulations (EAR) or the
    International Traffic in Arms Regulations (ITAR). Any review,
    retransmission, dissemination, or re-export to foreign or domestic
    entities by anyone other than the intended recipient in accordance
    with EAR and/or ITAR regulations is prohibited.

    /



_______________________________________________
USRP-users mailing list
[email protected]
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

_______________________________________________
USRP-users mailing list
[email protected]
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

Reply via email to