Hi, Sorry, I spoke poorly there. set_time_unknown_pps will fail if it does not see a 1PPS edge within a 1+epsilon second window. However, because you were using a sine wave the exact time that the "edge" of the pulse could vary. When distributing a time reference a fast rising edge is key to getting good temporal accuracy.
If you want to verify that both USRPs are set to the same time you should call the get_time_last_pps function after setting the time on both synchronously. The sync_to_gps code has a routine which would be useful. https://github.com/EttusResearch/uhd/blob/maint/host/examples/sync_to_gps.cpp#L145 Regards, Derek On Wed, Aug 2, 2017 at 4:09 PM, Cho, Daniel J (332C) < daniel.j....@jpl.nasa.gov> wrote: > Hello Derek, > > > > I thought the “set_time_unknown_pps” checks to confirm that the time is > correctly set? > > If that doesn’t, how do I know that the sync is set correctly without > using a spectrum analyzer? > > > > Thanks > > > > *From:* Derek Kozel [mailto:derek.ko...@ettus.com] > *Sent:* Wednesday, August 2, 2017 7:33 AM > *To:* Cho, Daniel J (332C) <daniel.j....@jpl.nasa.gov> > *Cc:* usrp-users@lists.ettus.com > *Subject:* Re: [USRP-users] PPS sync with USRP E310 timeout error > > > > Hello Daniel, > > There is no check in your code to confirm that the time is correctly set. > The 1PPS signal should be a square wave rather than a sine wave. It is a > logic signal rather than an RF one and the sync port is designed to handle > it. > http://files.ettus.com/manual/page_usrp_e3x0.html#e3x0_hw_pps > > The Octoclock which we use produces a 20% duty cycle square wave with 5V > high and 0V low. > > > > Regards, > > Derek > > > > On Wed, Aug 2, 2017 at 2:10 AM, Cho, Daniel J (332C) via USRP-users < > usrp-users@lists.ettus.com> wrote: > > Hello – > > > > I am using 2 USRP E310 which I would like to frequency sync together. I > am using a frequency generator which is generating a 1 PPS (1Hz sine wave) > signal which I put through a power splitter to provide both USRPs with the > same 1 PPS signal. I configured the rx_samples_to_file and > tx_samples_from_file codes to allow me to use the external 1PPS signal by > including the following into the code: > > > > //sleep off if gpsdo detected and time next pps already set > > boost::this_thread::sleep(boost::posix_time::seconds(1)); > > //set time source if specified > > if (not time_source.empty()) usrp->set_time_source(time_source); > > //set the time at an unknown pps (will throw if no pps) > > std::cout << std::endl << "Attempt to detect the PPS and set the time..." > << std::endl << std::endl; > > usrp->set_time_unknown_pps(uhd::time_spec_t(0.0)); > > std::cout << std::endl << "Success!" << std::endl << std::endl; > > > > When I run the rx_samples_to_file code with the above code included, I get > a timeout error. I found that it was due to the line “usrp-> > set_time_unknown_pps(uhd::time_spec_t(0.0));” > > How can I get my two USRPs frequency synced without getting this error? > > > > Also, I saw that the 1 PPS signal provided to the USRP should be 3.3V – > 5V. When I put a 1 PPS signal that strong on the spectrum analyzer, it > shows a power output above +10 dBm. I know that the max RX input power is > -15 dBm so I was hesitant to input a 1 PPS signal that strong. The 1 PPS > signal I put into the sync port was 100 mV. Even with a 1 PPS signal with > an output power of 100mV, I am still able to run the test_pps_input program > successfully. > > > > So in summary, should I just send a 1 PPS signal with a power output above > +10 dBm which equates to the 3.3V – 5V to the sync port even though I am > able to run the test_pps_input program successfully with 100mV? How can I > get the rx_samples_to_file program to run successfully without giving me a > timeout error using the above lines of code? > > > > Thanks > > > _______________________________________________ > USRP-users mailing list > USRP-users@lists.ettus.com > http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com > > >
_______________________________________________ USRP-users mailing list USRP-users@lists.ettus.com http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com