anant.tripa...@technosci.com wrote:

> Pretty much what the title says, our goal is to sync the timestamps to the 
> rising edge of the 1PPS signal such that they get reset exactly on the rising 
> edge of the 1pps signal, and increment the count of a custom metadata tag, to 
> the outgoing stream to the UHD application that we are working on.

---

Hey,\
\
If you are using the existing PPS in port, [there are already existing 
functions that can set the timestamps to an arbitrary value on the next PPS 
edge.](https://uhd.readthedocs.io/en/latest/classuhd_1_1rfnoc_1_1mb__controller_1_1timekeeper.html#a7a33e5c85c32cfb8c23937eb29b51a84)\
\
Since you did not specify which USRP device you are using I am just going to 
give the general approach.\
\
Via RFNoC Python API you should be able to access these via the timekeeper on 
the motherboard:\
\
`graph = uhd.rfnoc.RfnocGraph("addr=<Address of your device>") # Set pps source 
to external here if you need it, depending on device this would be the 
time_source=external argument.`

`tk = graph.get_mb_controller().get_timekeeper(0)              # Some devices 
have more then one timekeeper, using 0 as default.`

`tk.set_ticks_next_pps(0)                                      # Sets timestamp 
counter to 0 on next pps edge, you can also set it to an arbitrary value here.`

\
Regarding getting GPIO access from within your custom RFNoC block, that is 
dependent on the device you have, and can be a little bit more complicated.

Hope this helps a little.

Regards, \
Niels
_______________________________________________
USRP-users mailing list -- usrp-users@lists.ettus.com
To unsubscribe send an email to usrp-users-le...@lists.ettus.com
  • [USRP-users] Re: How to access t... niels.steffen.garibaldi--- via USRP-users

Reply via email to