[USRP-users] Syncing two USRP B200

J Subash j.subash at bham.ac.uk
Tue Feb 5 09:48:16 EST 2019


Hi Remco,

I am not sure about how to achieve this on GNU radio but this is easily 
done using the UHD python API. The setup is similar to yours with the 
1PPS and 10MHz ref. going to two B200's using a splitters.

Below is some example code:

The following function synchronises the two B200s to the same clock:

def setup_ref(usrp_uhf, usrp_sband, ref):
     """Setup the reference clock"""
     usrp_uhf.set_clock_source(ref)
     usrp_sband.set_clock_source(ref)
     # Lock onto clock signals for all mboards
     if ref != "internal":
         logger.debug("Now confirming lock on clock signals...")
         end_time = datetime.now() + timedelta(milliseconds=CLOCK_TIMEOUT)
         is_locked1 = usrp_uhf.get_mboard_sensor("ref_locked", 0).value
         is_locked2 = usrp_uhf.get_mboard_sensor("ref_locked", 0).value
         while (is_locked1 == 'false' or is_locked2 == 'false') and 
(datetime.now() < end_time):
             time.sleep(1e-3)
             is_locked1 = usrp_uhf.get_mboard_sensor("ref_locked", 0).value
             is_locked2 = usrp_sband.get_mboard_sensor("ref_locked", 
0).value
         if is_locked1 == 'False' or is_locked2 == 'False':
             logger.error("Unable to confirm clock signal locked on boards")
             return False
     return True

The following function will time align the two B200's

def setup_pps(usrp_uhf, usrp_sband, pps):
     """Setup the PPS source and align at next pps"""
     usrp_uhf.set_time_source(pps)
     usrp_sband.set_time_source(pps)
     #wait for next pps
     last_pps0 = usrp_uhf.get_time_last_pps()
     while True:
         last_pps_new = usrp_uhf.get_time_last_pps()
         if last_pps0.get_real_secs() != last_pps_new.get_real_secs():
             break
     #reset time at next pps
     usrp_uhf.set_time_next_pps(uhd.types.TimeSpec(0.0))
     usrp_sband.set_time_next_pps(uhd.types.TimeSpec(0.0))
     time.sleep(1.5)
     logger.debug("Now confirming sync of both USRP clocks...")
     return True

Hope that helps.

BW

JS


On 05/02/2019 13:06, usrp-users at lists.ettus.com wrote:
> Dear all,
>
> I am experiencing some troubles trying to synchronize two B200 USRPs.
> The 10MHz and the PPS of the USRPs are connected by means of a 
> splitter to a rubidium clock source.
> I try to replicate the test as seen in 
> "https://kb.ettus.com/Synchronization_and_MIMO_Capability_with_USRP_Devices" 
>
> I have a signal generator set to 200.01MHz and the USRPs are tuned to 
> 200MHz. However looking at the GUI Scope the frequencies are not 
> consistent at all. When looking at the graph a difference in 
> frequencies can clearly be seen.
> image.png
> The USRP sources are set to
> Sync: Unknown PPS, which according to another mailing list questions 
> should imply:
> set the time on the hardware to be the same as
> the PC clock, but using the external PPS trigger.
>
> The clock and timing sources are set to external. I have not specified 
> the starting time yet, so I expect the signals to be out of phase. 
> From my understanding the frequencies of the two devices should be the 
> same. However this does not seem the case.
> Furthermore I also read something about the USB3.0 controller not 
> always capable of handling two streams simultaneously, could this be a 
> cause?
> Looking forward to hearing some of your more experienced input, if any 
> further information is required please let me know. Thanks in advance!
>
> -- 
>
> Met vriendelijke groet/With kind regards,
>
> Remco Vink
>
> OPNTB.V. | Time provisioning
>
> De Boelelaan 1081 | Gebouw W&N |1081 HV Amsterdam
>
> E: r.vink at opnt.nl<mailto:r.vink at opnt.nl>|www.opnt.nl 
> <http://demo.altium.com/0a6ae56f2bc6e9fbbe>
>
>
> _______________________________________________
> USRP-users mailing list
> USRP-users at lists.ettus.com
> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

-- 
Joel

Joeal Subash
Research Fellow

Space Environment and Radio Engineering (SERENE) Group
LF04, Mechanical engineering building
University of Birmingham
Edgbaston Birmingham B15 2TT

j.subash at bham.ac.uk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20190205/20b8e3ed/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 194036 bytes
Desc: not available
URL: <http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20190205/20b8e3ed/attachment.png>


More information about the USRP-users mailing list