Hi everyone,

I am still working on the synchronization of my two USRP X310. Both get the same 10 MHz, 1 PPS and LO signals. I made a small piece of code to toggle one of the GPIOs at the Aux I/O of each USRP in a timed manner:
#define GPIOMASK   (1 << 4)
usrpDevice->set_gpio_attr("FP0", "CTRL", 0, GPIOMASK, 0);
usrpDevice->set_gpio_attr("FP0", "DDR", GPIOMASK, GPIOMASK, 0);
usrpDevice->set_gpio_attr("FP0", "CTRL", 0, GPIOMASK, 1);
usrpDevice->set_gpio_attr("FP0", "DDR", GPIOMASK, GPIOMASK, 1);
uhd::time_spec_t cmdTime = usrp->get_time_now() + uhd::time_spec_t(0.1);
while(1)
{
    usrp->set_command_time(cmdTime);
    usrpDevice->set_gpio_attr("FP0", "OUT", GPIOMASK, GPIOMASK, 0);
    usrpDevice->set_gpio_attr("FP0", "OUT", GPIOMASK, GPIOMASK, 1);
    cmdTime += uhd::time_spec_t(0.01);
    usrp->set_command_time(cmdTime);
    usrpDevice->set_gpio_attr("FP0", "OUT", 0, GPIOMASK, 0);
    usrpDevice->set_gpio_attr("FP0", "OUT", 0, GPIOMASK, 1);
    cmdTime += uhd::time_spec_t(0.01);
}

The code works just fine, and I can clearly see that the USRPs are not synchronized every time I start the program. Sometimes they are out of sync by 2 FPGA clock cycles (10 ns @ 200 MHz clock), plus or minus. So obiously the synchronization is not working properly. I am using the set_time_unknown_pps() method, and I tried using my own signals for 1PPS and 10 MHz or use one of the USRPs as source.
Is this a known problem? Is there a workaround or solution?

Best regards,
Fabian

_______________________________________________
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

Reply via email to