Forum: GNU Radio tuning while acquiring data

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
C95d4135a6fd5a14a3cdbe7430a26b00?d=identicon&s=25 Andrew Lutomirski (Guest)
on 2009-05-08 21:45
(Received via mailing list)
Hi all-

I'm trying to re-tune a daughterboard, while acquiring samples, and I
seem to get an overrun every time.  (This is in C++.)

Before I start investigating really hackish ways to make this work,
has anyone had any success getting this to work?

I don't actually care about the data I get while tuning, but I don't
want to lose track of the exact time, so I'd be happy with a way to
ask the USRP to pause for a specified number of samples, as well, or
even just to know how many samples I lost due to the overrun.

Thanks,
Andy
745d8202ef5a58c1058d0e5395a78f9c?d=identicon&s=25 Eric Blossom (Guest)
on 2009-05-09 03:29
(Received via mailing list)
On Fri, May 08, 2009 at 03:43:34PM -0400, Andrew Lutomirski wrote:
> Hi all-
>
> I'm trying to re-tune a daughterboard, while acquiring samples, and I
> seem to get an overrun every time.  (This is in C++.)

> Before I start investigating really hackish ways to make this work,
> has anyone had any success getting this to work?

I'm assuming this is on a USRP2.

The current firmware stops the streaming, does the tune, and restarts
streaming.  This produces a discontinuity of varying length, but
doesn't underrun.

Latest versions of the FPGA and firmware:

  http://gnuradio.org/releases/usrp2-bin/trunk/txrx_...
  http://gnuradio.org/releases/usrp2-bin/trunk/u2_re...


> I don't actually care about the data I get while tuning, but I don't
> want to lose track of the exact time, so I'd be happy with a way to
> ask the USRP to pause for a specified number of samples, as well, or
> even just to know how many samples I lost due to the overrun.

If you're using the libusrp2 interface, you can check the timestamp in
the metadata passed to your rx_sample_handler.

If you're using the usrp2_source_* interface there's currently no way to
know.  This will be possible when we implement the "stream annotation"
feature.

Eric
C95d4135a6fd5a14a3cdbe7430a26b00?d=identicon&s=25 Andrew Lutomirski (Guest)
on 2009-05-09 06:54
(Received via mailing list)
On Fri, May 8, 2009 at 9:28 PM, Eric Blossom <eb@comsec.com> wrote:
> On Fri, May 08, 2009 at 03:43:34PM -0400, Andrew Lutomirski wrote:
>> Hi all-
>>
>> I'm trying to re-tune a daughterboard, while acquiring samples, and I
>> seem to get an overrun every time.  (This is in C++.)
>
>> Before I start investigating really hackish ways to make this work,
>> has anyone had any success getting this to work?
>
> I'm assuming this is on a USRP2.

Whoops, should've mentioned.  This is a USRP1.

>
>> I don't actually care about the data I get while tuning, but I don't
>> want to lose track of the exact time, so I'd be happy with a way to
>> ask the USRP to pause for a specified number of samples, as well, or
>> even just to know how many samples I lost due to the overrun.

My current thought is to add a new FPGA register FR_SKIP_SAMPLES.
Writing a number N to that register would cause the next N samples
that would otherwise be written to USB to be skipped.  The sequence
would be:

1. Write 1000000 to FR_SKIP_SAMPLES.  (I suspect that just a few ms
worth of samples would be plenty.)
2. Tune the USRP.
3. Hope that tuning finishes before the full batch of samples have been
skipped.

Alternatively, I could try to modify the firmware to do i2c
asynchronously, but that sounds a lot more painful.

--Andy
745d8202ef5a58c1058d0e5395a78f9c?d=identicon&s=25 Eric Blossom (Guest)
on 2009-05-09 07:44
(Received via mailing list)
On Sat, May 09, 2009 at 12:53:04AM -0400, Andrew Lutomirski wrote:
> > I'm assuming this is on a USRP2.
>
> Whoops, should've mentioned.  This is a USRP1.

No problem.

Which daugtherboard?

Eric
C95d4135a6fd5a14a3cdbe7430a26b00?d=identicon&s=25 Andrew Lutomirski (Guest)
on 2009-05-09 15:30
(Received via mailing list)
On Sat, May 9, 2009 at 1:38 AM, Eric Blossom <eb@comsec.com> wrote:
>> >
>> > I'm assuming this is on a USRP2.
>>
>> Whoops, should've mentioned.  This is a USRP1.
>
> No problem.
>
> Which daugtherboard?

2 TVRX boards.  I don't have any TX boards.

--Andy
This topic is locked and can not be replied to.