Two more comments: - The clock is not exported by default. So MB 1 won't see a reference clock, and then you get the error you saw. - You can get frequency alignment between the boards this way, but the time will definitely be un-aligned, like Michael said.
-- M On 06/11/2018 03:38 PM, Michael West via USRP-users wrote: > Hello Eino, > > Even if you are successful getting one device to use the references of > the other, it is probably not what you want to do. There are > propagation delays on the 10 MHz and PPS signals that mean that the > devices are not truly synchronized. The proper way to synchronize the > devices is to use a common 10 MHz and PPS reference and use it as an > external reference to both devices. This is why Ettus sells a clock > distribution module <https://www.ettus.com/product/details/OctoClock-G>. > > Regards, > Michael > > On Mon, Jun 11, 2018 at 6:35 AM, Eino Virtanen via USRP-users > <[email protected] <mailto:[email protected]>> wrote: > > Hello again, > > Sorry for the multiple messages. I nailed down the problem to the > 'set_clock_source("external", 1)'. For some reason the other X310 > can't get the reference signal from the other one. I will continue > investigating. > > If someone has faced a similar problem, please tell me about it. > > -- > Best regards, > Eino Virtanen > > On 11 June 2018 at 12:04, Eino Virtanen <[email protected] > <mailto:[email protected]>> wrote: > > Dear recipents, > > > > I am trying to synchronize the clocks of two X310s using C. I have the > > following code: > > > > --- > > s->usrp->set_clock_source("internal", 0); > > s->usrp->set_time_source("internal", 0); > > > > s->usrp->set_clock_source("external", 1); > > s->usrp->set_time_source("external", 1); > > > > s->usrp->set_time_next_pps(uhd::time_spec_t(0.0)); > > sleep(1); > > --- > > > > It produces the following output: > > > > --- > > what(): RuntimeError: Reference Clock PLL failed to lock to > external source. > > --- > > > > I am able to synchronize the time using the example binaries, but not > > with my own code. I can see the PPS signal with my oscilloscope while > > running this code. > > > > Is my logic flawed? My understanding is that I simply set the board > > number 0 to listen to the clock and time sources of itself, and the > > board number 1 to listen to the clock and time sources of the external > > ports, which are connected to the board number 0. Then when > > set_time_next_pps() gets called, I assume the board number 0 sets the > > time according to its internal sources, and the board number 1 > > according to the external ones. > > > > Thanks for reading my query! > > > > -- > > Best regards, > > Eino Virtanen, very-soon-to-be-MSc > > _______________________________________________ > USRP-users mailing list > [email protected] <mailto:[email protected]> > http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com > <http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com> > > > > > _______________________________________________ > USRP-users mailing list > [email protected] > http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com > _______________________________________________ USRP-users mailing list [email protected] http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
