Hi Robert.  I think your issue may be that you need to set the time source
in UHD to sfp0:

https://kb.ettus.com/Using_Ethernet-Based_Synchronization_on_the_USRP%E2%84%A2_N3xx_Devices
(Scroll down to the "System Configuration" section).

-Robin


On Mon, Mar 15, 2021 at 11:57 AM Robert Clancy <rcla...@ltsnet.net> wrote:

> I am trying to test a White Rabbit switch with an N321 radio but am
> failing to be able to make a capture.
>
>
> I have Gnuradio 3.8.0 installed and the UHD version is reported as
> UHD_4.0.0.0-18-g83e878cf
>
>
> This is the response from a probe:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *[INFO] [UHD] linux; GNU C++ version 7.5.0; Boost_106501;
> UHD_4.0.0.0-18-g83e878cf [INFO] [MPMD] Initializing 1 device(s) in parallel
> with args:
> mgmt_addr=192.168.10.2,type=n3xx,product=n320,serial=31B36CF,claimed=False,addr=192.168.10.2
> [INFO] [MPM.main] Launching USRP/MPM, version: 4.0.0.0-g90ce6062 [INFO]
> [MPM.main] Spawning RPC process... [INFO] [MPM.PeriphManager] Device serial
> number: 31B36CF [INFO] [MPM.Rhodium-0] Enabling LO distribution board
> [INFO] [MPM.Rhodium-0] Successfully loaded all peripherals! [INFO]
> [MPM.Rhodium-1] Successfully loaded all peripherals! [INFO]
> [MPM.PeriphManager] Initialized 2 daughterboard(s). [INFO]
> [MPM.PeriphManager] No QSFP board detected: Assuming it is disabled in the
> device tree overlay (e.g., HG, XG images). [INFO] [MPM.PeriphManager]
> init() called with device args
> `clock_source=internal,time_source=internal'. [INFO] [MPM.Rhodium-0] init()
> called with args `clock_source=internal,time_source=internal' [INFO]
> [MPM.Rhodium-1] init() called with args
> `clock_source=internal,time_source=internal' [INFO]
> [MPM.Rhodium-0.init.LMK04828] LMK initialized and locked! [INFO]
> [MPM.Rhodium-1.init.LMK04828] LMK initialized and locked! [INFO]
> [MPM.Rhodium-1.DAC37J82] DAC PLL Locked! [INFO] [MPM.Rhodium-1.AD9695] ADC
> PLL Locked! [INFO] [MPM.Rhodium-1.init] JESD204B Link Initialization &
> Training Complete [INFO] [MPM.Rhodium-0.DAC37J82] DAC PLL Locked! [INFO]
> [MPM.Rhodium-0.AD9695] ADC PLL Locked! [INFO] [MPM.Rhodium-0.init] JESD204B
> Link Initialization & Training Complete [INFO] [MPM.RPCServer] RPC server
> ready! [INFO] [MPM.RPCServer] Spawning watchdog task... [INFO]
> [MPM.PeriphManager] init() called with device args
> `mgmt_addr=192.168.10.2,product=n320,clock_source=internal,time_source=internal'.
> [INFO] [MPM.Rhodium-0] init() called with args
> `mgmt_addr=192.168.10.2,product=n320,clock_source=internal,time_source=internal'
> [INFO] [MPM.Rhodium-1] init() called with args
> `mgmt_addr=192.168.10.2,product=n320,clock_source=internal,time_source=internal'
>   _____________________________________________________  / |       Device:
> N300-Series Device |
> _____________________________________________________ |    / |   |
> Mboard: ni-n3xx-31B36CF |   |   dboard_0_pid: 338 |   |   dboard_0_serial:
> 3192EC4 |   |   dboard_1_pid: 338 |   |   dboard_1_serial: 3192EB9 |   |
> eeprom_version: 3 |   |   fs_version: 20200914000806 |   |
> mender_artifact: v4.0.0.0_n3xx |   |   mpm_sw_version: 4.0.0.0-g90ce6062
> |   |   pid: 16962 |   |   product: n320 |   |   rev: 7 |   |
> rpc_connection: remote |   |   serial: 31B36CF |   |   type: n3xx |   |
> MPM Version: 3.0 |   |   FPGA Version: 8.0 |   |   FPGA git hash:
> be53058.clean |   |    |   |   Time sources:  internal, external, gpsdo,
> sfp0 |   |   Clock sources: external, internal, gpsdo |   |   Sensors:
> ref_locked, gps_locked, temp, fan, gps_gpgga, gps_sky, gps_time, gps_tpv
> |     _____________________________________________________ |    / |
> |       RFNoC blocks on this device: |   |    |   |   * 0/DDC#0 |   |   *
> 0/DDC#1 |   |   * 0/DUC#0 |   |   * 0/DUC#1 |   |   * 0/Radio#0 |   |   *
> 0/Radio#1 |   |   * 0/Replay#0 |
> _____________________________________________________ |    / |   |
> Static connections on this device: |   |    |   |   * 0/SEP#0:0==>0/DUC#0:0
> |   |   * 0/DUC#0:0==>0/Radio#0:0 |   |   * 0/Radio#0:0==>0/DDC#0:0 |   |
> * 0/DDC#0:0==>0/SEP#0:0 |   |   * 0/SEP#1:0==>0/DUC#1:0 |   |   *
> 0/DUC#1:0==>0/Radio#1:0 |   |   * 0/Radio#1:0==>0/DDC#1:0 |   |   *
> 0/DDC#1:0==>0/SEP#1:0 |   |   * 0/SEP#2:0==>0/Replay#0:0 |   |   *
> 0/Replay#0:0==>0/SEP#2:0 |   |   * 0/SEP#3:0==>0/Replay#0:1 |   |   *
> 0/Replay#0:1==>0/SEP#3:0 |
> _____________________________________________________ |    / |   |       TX
> Dboard: dboard |   |
> _____________________________________________________ |   |    / |   |
> |       TX Frontend: 0 |   |   |   Name: Rhodium |   |   |   Antennas:
> TX/RX, RX2, CAL, TERM |   |   |   Freq range: 1.000 to 6000.000 MHz |   |
> |   Gain range all: 0.0 to 60.0 step 1.0 dB |   |   |   Bandwidth range:
> 250000000.0 to 250000000.0 step 0.0 Hz |   |   |   Connection Type: |   |
> |   Uses LO offset: No |
> _____________________________________________________ |    / |   |       RX
> Dboard: dboard |   |
> _____________________________________________________ |   |    / |   |
> |       RX Frontend: 0 |   |   |   Name: Rhodium |   |   |   Antennas:
> TX/RX, CAL, TERM |   |   |   Freq range: 1.000 to 6000.000 MHz |   |   |
> Gain range all: 0.0 to 60.0 step 1.0 dB |   |   |   Bandwidth range:
> 250000000.0 to 250000000.0 step 0.0 Hz |   |   |   Connection Type: |   |
> |   Uses LO offset: No |
> _____________________________________________________ |    / |   |       TX
> Dboard: dboard |   |
> _____________________________________________________ |   |    / |   |
> |       TX Frontend: 0 |   |   |   Name: Rhodium |   |   |   Antennas:
> TX/RX, RX2, CAL, TERM |   |   |   Freq range: 1.000 to 6000.000 MHz |   |
> |   Gain range all: 0.0 to 60.0 step 1.0 dB |   |   |   Bandwidth range:
> 250000000.0 to 250000000.0 step 0.0 Hz |   |   |   Connection Type: |   |
> |   Uses LO offset: No |
> _____________________________________________________ |    / |   |       RX
> Dboard: dboard |   |
> _____________________________________________________ |   |    / |   |
> |       RX Frontend: 0 |   |   |   Name: Rhodium |   |   |   Antennas:
> TX/RX, CAL, TERM |   |   |   Freq range: 1.000 to 6000.000 MHz |   |   |
> Gain range all: 0.0 to 60.0 step 1.0 dB |   |   |   Bandwidth range:
> 250000000.0 to 250000000.0 step 0.0 Hz |   |   |   Connection Type: |   |
> |   Uses LO offset: No *
>
>
> I am using this firmware:
>
> *uhd_image_loader --args type=n3xx,addr=192.168.10.2
> --fpga-path="/opt/gnuradio/v3.8.0.0/share/uhd/images/usrp_n320_fpga_WX.bit"*
>
>
> [INFO] [UHD] linux; GNU C++ version 7.5.0; Boost_106501;
> UHD_4.0.0.0-18-g83e878cf
> [INFO] [MPMD] Initializing 1 device(s) in parallel with args:
> mgmt_addr=192.168.10.2,type=n3xx,product=n320,serial=31B36CF,claimed=False,skip_init=1
> [INFO] [MPMD] Claimed device without full initialization.
> [INFO] [MPMD IMAGE LOADER] Starting update. This may take a while.
> [INFO] [MPM.PeriphManager] Updating component `fpga'
> [INFO] [MPM.PeriphManager] Updating component `dts'
> [INFO] [MPM.RPCServer] Resetting peripheral manager.
> [INFO] [MPM.PeriphManager] Device serial number: 31B36CF
> [INFO] [MPM.Rhodium-0] Enabling LO distribution board
> [INFO] [MPM.Rhodium-0] Successfully loaded all peripherals!
> [INFO] [MPM.Rhodium-1] Successfully loaded all peripherals!
> [INFO] [MPM.PeriphManager] Initialized 2 daughterboard(s).
> [INFO] [MPM.PeriphManager] No QSFP board detected: Assuming it is disabled
> in the device tree overlay (e.g., HG, XG images).
> [INFO] [MPM.PeriphManager] init() called with device args
> `clock_source=internal,time_source=internal'.
> [INFO] [MPM.Rhodium-0] init() called with args
> `clock_source=internal,time_source=internal'
> [INFO] [MPM.Rhodium-1] init() called with args
> `clock_source=internal,time_source=internal'
> [INFO] [MPM.Rhodium-0.init.LMK04828] LMK initialized and locked!
> [INFO] [MPM.Rhodium-1.init.LMK04828] LMK initialized and locked!
> [INFO] [MPM.Rhodium-1.DAC37J82] DAC PLL Locked!
> [INFO] [MPM.Rhodium-1.AD9695] ADC PLL Locked!
> [INFO] [MPM.Rhodium-1.init] JESD204B Link Initialization & Training
> Complete
> [INFO] [MPM.Rhodium-0.DAC37J82] DAC PLL Locked!
> [INFO] [MPMD IMAGE LOADER] Update component function succeeded.
> [INFO] [MPM.Rhodium-0.AD9695] ADC PLL Locked!
> [INFO] [MPM.Rhodium-0.init] JESD204B Link Initialization & Training
> Complete
>
>
>
>
>
> What I think are the relevant parts from a simple script to make a capture:
>         ##################################################
>         # Variables
>         ##################################################
>         self.samp_rate = samp_rate = 12288000
>
>         ##################################################
>         # Blocks
>         ##################################################
>         self.uhd_usrp_source_0 = uhd.usrp_source(
>             ",".join(("", "")),
>             uhd.stream_args(
>                 cpu_format="fc32",
>                 args='addr=192.168.10.2',
>                 channels=list(range(0,1)),
>             ),
>         )
>         ## WhiteRabbit addition
>         #self.uhd_usrp_source_0.set_clock_rate(200000000)
>         self.uhd_usrp_source_0.set_antenna("TX/RX")
>         print("Master clock rate set to:
> ",self.uhd_usrp_source_0.get_clock_rate())
>         print("Times sources are
> ",self.uhd_usrp_source_0.get_time_sources(0))
>         print("Sample rates is
> ",self.uhd_usrp_source_0.get_samp_rates().stop())
>         print("Antenna is ",self.uhd_usrp_source_0.get_antenna())
>         self.uhd_usrp_source_0.set_clock_source("internal")
>         self.uhd_usrp_source_0.set_time_source("sfp0")
>         print("Time source is ",self.uhd_usrp_source_0.get_time_source(0))
>         ###
>
>         self.uhd_usrp_source_0.set_center_freq(75000100, 0)
>         print("Tuned to  ",self.uhd_usrp_source_0.get_center_freq(0))
>         self.uhd_usrp_source_0.set_gain(0, 0)
>         self.uhd_usrp_source_0.set_antenna('TX/RX', 0)
>         self.uhd_usrp_source_0.set_samp_rate(samp_rate)
>
> And then the error:
>
> [INFO] [UHD] linux; GNU C++ version 7.5.0; Boost_106501;
> UHD_4.0.0.0-18-g83e878cf
> [INFO] [MPMD] Initializing 1 device(s) in parallel with args:
> mgmt_addr=192.168.10.2,type=n3xx,product=n320,serial=31B36CF,claimed=False,addr=192.168.10.2
> [INFO] [MPM.PeriphManager] init() called with device args
> `mgmt_addr=192.168.10.2,product=n320,clock_source=internal,time_source=internal'.
> [INFO] [MPM.Rhodium-0] init() called with args
> `mgmt_addr=192.168.10.2,product=n320,clock_source=internal,time_source=internal'
> [INFO] [MPM.Rhodium-1] init() called with args
> `mgmt_addr=192.168.10.2,product=n320,clock_source=internal,time_source=internal'
> Master clock rate set to:  245760000.0
> Times sources are  ('internal', 'external', 'gpsdo', 'sfp0')
> Sample rates is  245760000.0
> Antenna is  TX/RX
> [INFO] [MPM.Rhodium-0] Re-initializing daughter board. This may take some
> time.
> [INFO] [MPM.Rhodium-0] init() called with args
> `mgmt_addr=192.168.10.2,product=n320,clock_source=internal,time_source=sfp0,skip_rfic=None,master_clock_rate=245760000.0,ref_clk_freq=25000000.0'
> [ERROR] [RPC] TDC Failed to reset.
> Traceback (most recent call last):
>   File "./TimeDomainDisplay.py", line 212, in <module>
>     main()
>   File "./TimeDomainDisplay.py", line 188, in main
>     tb = top_block_cls()
>   File "./TimeDomainDisplay.py", line 95, in __init__
>     self.uhd_usrp_source_0.set_time_source("sfp0")
>   File
> "/opt/gnuradio/v3.8.0.0/lib/python3/dist-packages/gnuradio/uhd/uhd_swig.py",
> line 4577, in set_time_source
>     return _uhd_swig.usrp_source_sptr_set_time_source(self, source, mboard)
> RuntimeError: RuntimeError: Error during RPC call to `set_time_source'.
> Error message: TDC Failed to reset.
> [INFO] [MPM.Rhodium-0.init.LMK04828] LMK initialized and locked!
> [ERROR] [MPM.Sync-0] TDC Failed to Reset! Check your clocks! Status: 0x0
> [ERROR] [MPM.RPCServer] Uncaught exception in method set_time_source :TDC
> Failed to reset.
>  Traceback (most recent call last):
>   File "/usr/lib/python3.7/site-packages/usrp_mpm/rpc_server.py", line
> 186, in new_claimed_function
>     return function(*args)
>   File "/usr/lib/python3.7/site-packages/usrp_mpm/periph_manager/n3xx.py",
> line 596, in set_time_source
>     self.set_sync_source(source)
>   File "/usr/lib/python3.7/site-packages/usrp_mpm/periph_manager/n3xx.py",
> line 696, in set_sync_source
>     skip_rfic=args.get('skip_rfic', None)
>   File
> "/usr/lib/python3.7/site-packages/usrp_mpm/dboard_manager/rhodium.py", line
> 478, in update_ref_clock_freq
>     self._reinit(self.master_clock_rate)
>   File
> "/usr/lib/python3.7/site-packages/usrp_mpm/dboard_manager/rhodium.py", line
> 438, in _reinit
>     self.init(args)
>   File
> "/usr/lib/python3.7/site-packages/usrp_mpm/dboard_manager/rhodium.py", line
> 341, in init
>     init_result = RhodiumInitManager(self, self._spi_ifaces).init(args)
>   File
> "/usr/lib/python3.7/site-packages/usrp_mpm/dboard_manager/rh_init.py", line
> 344, in init
>     args)
>   File
> "/usr/lib/python3.7/site-packages/usrp_mpm/dboard_manager/rh_init.py", line
> 100, in _sync_db_clock
>     target_offset=trace_delay_offset))
>   File "/usr/lib/python3.7/site-packages/usrp_mpm/cores/tdc_sync.py", line
> 201, in run
>     self.configure(force=True)
>   File "/usr/lib/python3.7/site-packages/usrp_mpm/cores/tdc_sync.py", line
> 254, in configure
>     raise RuntimeError("TDC Failed to reset.")
> RuntimeError: TDC Failed to reset.
>
>
> Can anyone shed any light on what is going on?
>
> Has anyone actually got an Ettus radio working with the WX firmware and a
> White Rabbit switch?
>
> FWIW, the WR switch appears happy. I've walked its SNMP tree and all seems
> well. It is operating in Grandmaster mode with the one N321 hanging off its
> first port.
>
> Robert
>
> _______________________________________________
> USRP-users mailing list -- usrp-users@lists.ettus.com
> To unsubscribe send an email to usrp-users-le...@lists.ettus.com
>
_______________________________________________
USRP-users mailing list -- usrp-users@lists.ettus.com
To unsubscribe send an email to usrp-users-le...@lists.ettus.com

Reply via email to