On 11/25/2011 05:51 PM, Yan Nie wrote: > I really appreciate your reply, Josh. > > I am using a GPS as the input for PPS of my receiver based on USRP > N200 in order to synchronize with a transmitter which uses GPS pulse > to synchronize with other devices. This transmitter detects the NEG > edge of GPS pulse, then 2ms later, starts to transmit signal for > 1ms,then it suspends for the remainder of this second. When next GPS > pulse coming at the beginning of next second, this transmitter > repeats the transmission process again for every second. > > Therefore, this PPS signal is used as a synchronization signal in my > receiver to synchronously receive the signal sent by this transmitter > needed to collaborate with. The PPS signal need to trigger the signal > reception every second, as the precision of the clock of USRP and GPS > cannot be exactly the same. If only use PPS to trigger the latching > of the time registers the first second of signal reception, > eventually, the receiver and transmitter cannot be precisely > synchronized. >
Ah, so you are not sharing a reference, therefore PPS is not "pulse per second", its "pulse per approximately a second" because of clock drift, in other words, just a generic event trigger. Well, there isnt a way to cause streaming to start on a pulse unless you perform some FPGA mods, but I will tell you one creative way to solve this: Continually read get_time_last_pps(). Every time this function returns a different value, you know the exact time (relative to USRP) that a pulse event occurred. So you know: 1) the exact time for every sample thanks to stream tags 2) the exact time of every pulse thanks to get_time_last_pps Now you just have make some code that combines both pieces of information to store the samples. -Josh _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio