discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] detect PPS every second for synchronization


From: Yan Nie
Subject: [Discuss-gnuradio] detect PPS every second for synchronization
Date: Wed, 02 Nov 2011 18:43:29 -0400

Dear all,

I ma using USRP N200 with LFTX & LFRX +UHD to build up a transmitter and 
receiver. The transmitter and receiver are working well if continuously running 
without changing the USRP configuration. I am trying to use a GPS as the 
synchronization signal for signal reception, which is detecting the GPS pulse 
every second and using this pulse to trigger the signal reception.

I am using the 'set_clock_config' to set the PPS clock while the flow graph for 
receiver is built. The negative edge of the GPS pulse could be detected when 
the flow graph for receiver start running. I am wondering how to continuously 
detect the GPS pulse every second and use it as PPS signal to trigger the 
signal reception, so that the receiver could be able to synchronized with other 
device using GPS pulse. I tried to create a separate thread after the receiver 
flow graph start running:  (but this approach gives the USRP2 overrun result)

def pps_setting(tb)
    while (1):
    
          #pps clock configuration
          tb.clk_cfg = uhd.clock_config_t()
          tb.clk_cfg.pps_source = uhd.clock_config_t.PPS_SMA
          tb.clk_cfg.pps_polarity = uhd.clock_config.PPS_NEG
          tb._u2source.set_clock_config(tb.clk_cfg, uhd.ALL_MBOARDS)
          tb._u2source.set_time_unknown_pps(uhd.time_spec_t(0.0))
          
          tb.set_sample_rate(tb.sample_rate_rx)
          tb.set_freq(tb.freq_rx, tb.lo_offset)
          time.sleep(1.0)

1. I am wondering what is the problem? or how to detect the GPS pulse every 
second and use it to trigger the signal reception every second for 0.5 second 
signal receiving duration.

2. The same question for RF frequency changing. if I would like to change the 
RF frequency every second, what could be the best approach? 

Thank you so much!

Thanks,
Yan



reply via email to

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