discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Using PPS to trigger received data storage in Pyt


From: Josh Blum
Subject: Re: [Discuss-gnuradio] Using PPS to trigger received data storage in Python
Date: Wed, 23 Nov 2011 15:25:01 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1

When you say PPS, do you mean "pulse per second" or are you trying to
use the PPS input as a generic triggering system? If the second case,
you can do this, but my advice will be different.

> 1. I am wondering how to fill meta-data in Python if device.recv() is
> not swigged? I need to use the PPS signal to trigger the received
> data storage for 1ms every second after detecting the edge of PPS

It seems like you do not need the PPS to trigger anything. Your
downstream block can use the timestamp tag and sample count to determine
which samples should be stored.

> signal every second. I am using the follow setting method to detect
> the PPS signal:
> 
> self.clk_cfg = uhd.clock_config() self.clk_cfg.pps_source =
> uhd.clock_config.PPS_SMA self.clk_cfg.pps_polarity =
> uhd.clock_config.PPS_NEG self._usrp2.set_clock_config(self.clk_cfg,
> uhd.ALL_MBOARDS) 
> self._usrp2.set_time_unknown_pps(uhd.time_spec(0.0))
> 

That will work

> 2. This PPS setting is done just after the usrp device is created.
> The PPS signal could be detected while usrp device is setup. I am
> also wondering if this approach could make usrp detect PPS signal
> every second or only once when the usrp device is setup?
> 

You need to understand that the PPS is only used to trigger the latching
of the time registers. Once you set the time registers, thats it, your
are done. You know what time the next pps will occur because it is one
second plus the time you set.

-Josh



reply via email to

[Prev in Thread] Current Thread [Next in Thread]