A different approach makes sense.  What I need this for is doing some book
keeping when certain frame/slots occur.  Since I have a TDMA system, I need
to make sure the metadata (e.g. tx_time tag) I apply to my packets is in
sync with the radio time.  Additionally, the receive time is important to
me (for estimating time of flight - which I do by transmitting the tx_time
in packet payload and subtracting it from rx_time).  So given these two
constraints I figured it would be easiest for me just to use one clock for
everything.

The other approaches I can think of are

1) Sync the PC clock (like I mentioned before)
2) Estimate the clock difference using something like get_time_last_pps()
in a loop (like in new version of query_gpsdo_sensors) and pass around that
offset.

I'm not sure what advantages and disadvantages are to 1) and with 2) it
seems a little cumbersome but do-able.  By the way, I've used the global
block registry for accessing the USRP clock before and that was pretty easy
to use (is is available in Python?).  Is there some other approach I'm
missing?

Devin

On Wed, Jun 8, 2016 at 4:30 PM, Marcus Müller <marcus.muel...@ettus.com>
wrote:

> Hi Devin,
>
> this won't work out for the simple reason that timed commands happen in
> the FPGA on the USRP, and C++ happens in your PC, and the coupling between
> both is loose at best – there's always some random latency bus (network,
> USB,…) between the USRP and the host, and hence, these two clocks never
> agree on how fast time progresses, or how late it actually is.
>
> Now, in my experience, things like these work out if one approaches them
> differently; could you hence explain what you need to be called, and why
> that has to happen at a specific "radio time" (as opposed to "CPU time")?
>
> Best regards,
> Marcus
>
>
> On 08.06.2016 22:22, devin kelly wrote:
>
> Hello,
>
> For my applications the MAC layer of my waveform requires me to implement
> a few timers (e.g. for slot and frame times, etc).
>
> What I'd like to do is exclusively use the USRP clock for these timers.
> I've tried mixing the system clock and the USRP clock before (see a few
> messages on this list from a few months ago) and I couldn't get the
> accuracy I needed.
>
> Is there any way to setup a callback using the USRP clock. Sort of like a
> UHD timed_command except instead of changing the gain, frequency, etc. I
> want to call some C++ function.
>
> Also, I think I could try to sync my PC clock with the USRP clock but it
> seems using "Unknown PPS" or "Don't Sync" are usually recommended but I
> don't understand why.
>
> Thanks,
> Devin
>
>
> _______________________________________________
> Discuss-gnuradio mailing 
> listDiscuss-gnuradio@gnu.orghttps://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>
>
>
> _______________________________________________
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>
>
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to