Hi,

The UHD interface supports messages to change center frequency etc [1].
I would want to send the following commands via messages to the USRP Sink and 
USRP Source, respectively:

now = self.uhd_usrp_sink_0.get_time_now()
timeStamp = now + uhd.time_spec(0.1)

tune_req_tx = uhd.tune_request(fcenter-1e6, 1e6)
tune_req_tx.args=uhd.device_addr(','.join(["mode_n=integer", 
"int_n_step=1000e3",]))
self.uhd_usrp_sink_0.set_command_time(timeStamp)
res1 = self.uhd_usrp_sink_0.set_center_freq(  tune_req_tx, 0)
self.uhd_usrp_sink_0.clear_command_time()

tune_req_rx = uhd.tune_request(2*fcenter)
tune_req_rx.args=uhd.device_addr(','.join(["mode_n=integer", 
"int_n_step=1000e3",]))
now = self.uhd_usrp_sink_0.get_time_now()
self.uhd_usrp_source_0.set_command_time(timeStamp)
res2 = self.uhd_usrp_source_0.set_center_freq(tune_req_rx, 0)
self.uhd_usrp_source_0.clear_command_time()

The first issue is that the "tune_request" described in [1] is a simple pair. 
However, the real uhd::tune_request_t is more comprehensive and includes the 
"args" element that I need to set to "mode_n=integer", "int_n_step=1000e3" for 
integer N PLL.

The second issue is the timed command. It seems usrp_block::set_command_time 
translates into "time" with "timestamp" and usrp_block::clear_command_time 
translates into "time" with PMT_NIL. However, how to I obtain the current UHD 
time (uhd_usrp_sink_0.get_time_now)?

Thanks,
Luke


[1] https://www.gnuradio.org/doc/doxygen/page_uhd.html



_______________________________________________
USRP-users mailing list
[email protected]
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

Reply via email to