I am using a master clock rate of 48 MHz and a sample rate of 8 MHz. On Mon, Jun 15, 2020, 4:41 PM Marcus D. Leech <patchvonbr...@gmail.com> wrote:
> On 06/15/2020 03:42 PM, Aaron Smith wrote: > > I am using the python api. > > > > usrp = uhd.usrp.MultiUSRP() > > > > # Set gain, clock rate, sample rate etc... > > > > usrp.set_clock_source('external') > > usrp.set_time_source('external') > > > > ts_reset = uhd.types.TimeSpec(0.0) > > usrp.set_time_next_pps(ts_reset) > > time.sleep(1.0) > > last_pps = usrp.get_time_last_pps().to_ticks(1e9) > > if last_pps % int(1e9) != 0: > > print("Error failed to align clock") > > > > # The signal is complex float data, scaled to a max amplitude of 0.9 > > approx 0.1 secs in duration > > signal_data = numpy.fromfile('signal.dat',dtype=numpy.complex64) > > > > wirefmt = 'sc16' > > > > sa = uhd.usrp.StramArgs('fc32',wirefmt) > > sa.channels = [0] > > stream = usrp.get_tx_stream(sa) > > > > # Send 3 seconds in future > > send_time = usrp.get_time_last_pps().get_real_secs() + 3.0 > > metadata = uhd.type.TXMetadata() > > metadata.has_time_spec = True > > metadata.time_spec = uhd.types.TimeSpec(send_time) > > > > stream.send(signal_data, metadata) > > > > # Ensure the transmission is complete before returning > > time.sleep(4.0) > > > > sys.exit(0) > > > > > This probably has to do with uncertainty in the way the 1PPS signal is > flopped into the device. What sample rate are you using, and what > master clock rate? > > >
_______________________________________________ USRP-users mailing list USRP-users@lists.ettus.com http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com