Re: [USRP-users] USRP X310 ignored DSP retuning on TX when using a timed command

2020-02-28 Thread Marcus D. Leech via USRP-users

On 02/28/2020 01:01 PM, Lukas Haase via USRP-users wrote:

Hi again,

I created a minimum example (gnuradio) that shows the issue described below.
To summarize: Retuning to a different dsp frequency on an USRP X310 (+UBX160) 
does not work (command ignored) ONLY if a timed command (in future is used).
The code shows it in a simple manner. Commenting out the single line with 
set_command_time makes the example work.

I am absolutely out of ideas and would appreciate any input!

Best,
Lukas

Lukas.

Thanks for sticking with this.  I'll have a discussion with Ettus R&D to 
see if this is a known issue and/or if there's a workaround.


Remind me which version of UHD you're using?




#!/usr/bin/env python2
# -*- coding: utf-8 -*-

from gnuradio import analog
from gnuradio import gr
from gnuradio import uhd
import threading
import time

class switch_on_click_debug_tx_retune(gr.top_block):

 def __init__(self):
 gr.top_block.__init__(self, "Switch On Click Debug Tx Retune")
 self.variable_function_probe_0 = variable_function_probe_0 = 0
 self.samp_rate = samp_rate = 5e6
 self.uhd_usrp_sink_0 = uhd.usrp_sink(",".join(("", "dboard_clock_rate=20e6")), 
uhd.stream_args(cpu_format="fc32", channels=range(1)))
 self.uhd_usrp_sink_0.set_clock_rate(200e6, uhd.ALL_MBOARDS)
 self.uhd_usrp_sink_0.set_clock_source('internal', 0)
 self.uhd_usrp_sink_0.set_samp_rate(samp_rate)
 self.uhd_usrp_sink_0.set_center_freq(900e6, 0)
 self.uhd_usrp_sink_0.set_gain(0, 0)

 def _hopper():
 i = 0
 while True:
 if i % 2 == 0:
fdsp = 0
 else:
fdsp = -2e6
 print("Change TX dsp_freq=" + str(fdsp))
 tune_req_tx = uhd.tune_request()
 tune_req_tx.rf_freq_policy = uhd.tune_request.POLICY_NONE
 tune_req_tx.dsp_freq_policy = uhd.tune_request.POLICY_MANUAL
 tune_req_tx.rf_freq = 900e6
 tune_req_tx.dsp_freq = fdsp

 now = self.uhd_usrp_sink_0.get_time_now()
 # *** HOPPING WORKS IF THE NEXT LINE IS COMMENTED *** !!!
 self.uhd_usrp_sink_0.set_command_time(now + uhd.time_spec(0.1))
 res1 = self.uhd_usrp_sink_0.set_center_freq(  tune_req_tx, 0)
 self.uhd_usrp_sink_0.clear_command_time()

 i = i + 1
 time.sleep(4.0)
 _hopper_thread = threading.Thread(target=_hopper)
 _hopper_thread.daemon = True
 _hopper_thread.start()

 self.analog_sig_source_x_1 = analog.sig_source_c(samp_rate, 
analog.GR_COS_WAVE, 1e6, 1, 0)
 self.connect((self.analog_sig_source_x_1, 0), (self.uhd_usrp_sink_0, 
0))

 def get_samp_rate(self):
 return self.samp_rate

 def set_samp_rate(self, samp_rate):
 self.samp_rate = samp_rate
 self.uhd_usrp_sink_0.set_samp_rate(self.samp_rate)
 self.analog_sig_source_x_1.set_sampling_freq(self.samp_rate)

def main(top_block_cls=switch_on_click_debug_tx_retune, options=None):

 tb = top_block_cls()
 tb.start()
 try:
 raw_input('Press Enter to quit: ')
 except EOFError:
 pass
 tb.stop()
 tb.wait()


if __name__ == '__main__':
 main()




PS: I look at the output on a spectrum analyzer and observe how the frequency 
changes.



















Gesendet: Donnerstag, 27. Februar 2020 um 19:30 Uhr
Von: "Lukas Haase" 
An: "USRP-users@lists.ettus.com" 
Betreff: Re: How do timed commands work for two blocks (USRP Sink+USRP Source)?

A quick update which may make things easier to debug: I am observing TX/RX on a 
spectrum analyzer and see if the frequency changes.
As soon as I enable timed command, the tune command is ignored!

For simplicity, I am completely removing the RX parts (uhd_usrp_source_0).

Now this works:

tune_req_tx = uhd.tune_request()
tune_req_tx.rf_freq_policy = uhd.tune_request.POLICY_MANUAL
tune_req_tx.dsp_freq_policy = uhd.tune_request.POLICY_MANUAL
tune_req_tx.rf_freq = 900e6
tune_req_tx.dsp_freq = -2e6

now = usrp_sink.get_time_now()
#usrp_sink.set_command_time(now + uhd.time_spec(1))
res1 = usrp_sink.set_center_freq(  tune_req_tx, 0)
usrp_sink.clear_command_time()

When this code is executed, the signal jumps by 2 MHz at the spectrum analyzer.

Now I only uncomment set_timed_command above:

usrp_sink.set_command_time(now + uhd.time_spec(1))

and repeat. NO frequency change any more!

That means as soon as I use timed command (set_command_time) for changing the 
DSP frequency on a TX it is just IGNORED!

This must be a bug ... or do I really do something fundamentally wrong?


USRP X310 with 2xUBX-160. TX/RX from dautherboard 1 is connected to spectrum 
analyzer.


Thank you!
Lukas



Lukas Haase wrote:

How do these timed commands work exactly when using USRP Source together with 
USRP Sink? (I need to phase-align RX and TX hence use

Re: [USRP-users] Device Recovery N210: JTAG programmer

2020-02-28 Thread Nick Foster via USRP-users
Sumit,

Any JTAG programmer which is compatible with Xilinx iMPACT should work
fine. I can recommend the solutions from Digilent (HS2, HS3) or Xilinx
(Platform USB II).

Nick

On Fri, Feb 28, 2020 at 2:19 AM Sumit Kumar via USRP-users <
usrp-users@lists.ettus.com> wrote:

> Hi,
> I have 3 bricked N210 to be recovered. I was following the post
> https://kb.ettus.com/N200/N210_Device_Recovery
>
> It says JTAG programmer and in the picture I can see the model no. is
> DLC9G.
>
> I found something on Amazon which has the same model number but does not
> looks the same. Can anyone confirm if this is correct.
>
> https://www.amazon.fr/Plate-Forme-Compatible-lautolaveuse-programmable-XILINX/dp/B07Y7PBBGQ/ref=sr_1_1?__mk_fr_FR=%C3%85M%C3%85%C5%BD%C3%95%C3%91&keywords=DLC9G&qid=1582884943&sr=8-1
>
>
> Regards
> --
> --
> Sumit kumar
> Postdoc
> SnT, Luxembourg
>
>
> ___
> USRP-users mailing list
> USRP-users@lists.ettus.com
> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
>
___
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com


[USRP-users] USRP X310 ignored DSP retuning on TX when using a timed command (was: Re: How do timed commands work for two blocks (USRP Sink+USRP Source)?)

2020-02-28 Thread Lukas Haase via USRP-users
Hi again,

I created a minimum example (gnuradio) that shows the issue described below.
To summarize: Retuning to a different dsp frequency on an USRP X310 (+UBX160) 
does not work (command ignored) ONLY if a timed command (in future is used).
The code shows it in a simple manner. Commenting out the single line with 
set_command_time makes the example work.

I am absolutely out of ideas and would appreciate any input!

Best,
Lukas


#!/usr/bin/env python2
# -*- coding: utf-8 -*-

from gnuradio import analog
from gnuradio import gr
from gnuradio import uhd
import threading
import time

class switch_on_click_debug_tx_retune(gr.top_block):

def __init__(self):
gr.top_block.__init__(self, "Switch On Click Debug Tx Retune")
self.variable_function_probe_0 = variable_function_probe_0 = 0
self.samp_rate = samp_rate = 5e6
self.uhd_usrp_sink_0 = uhd.usrp_sink(",".join(("", 
"dboard_clock_rate=20e6")), uhd.stream_args(cpu_format="fc32", 
channels=range(1)))
self.uhd_usrp_sink_0.set_clock_rate(200e6, uhd.ALL_MBOARDS)
self.uhd_usrp_sink_0.set_clock_source('internal', 0)
self.uhd_usrp_sink_0.set_samp_rate(samp_rate)
self.uhd_usrp_sink_0.set_center_freq(900e6, 0)
self.uhd_usrp_sink_0.set_gain(0, 0)

def _hopper():
i = 0
while True:
if i % 2 == 0:
   fdsp = 0
else:
   fdsp = -2e6
print("Change TX dsp_freq=" + str(fdsp))
tune_req_tx = uhd.tune_request()
tune_req_tx.rf_freq_policy = uhd.tune_request.POLICY_NONE
tune_req_tx.dsp_freq_policy = uhd.tune_request.POLICY_MANUAL
tune_req_tx.rf_freq = 900e6
tune_req_tx.dsp_freq = fdsp

now = self.uhd_usrp_sink_0.get_time_now()
# *** HOPPING WORKS IF THE NEXT LINE IS COMMENTED *** !!!
self.uhd_usrp_sink_0.set_command_time(now + uhd.time_spec(0.1))
res1 = self.uhd_usrp_sink_0.set_center_freq(  tune_req_tx, 0)
self.uhd_usrp_sink_0.clear_command_time()

i = i + 1
time.sleep(4.0)
_hopper_thread = threading.Thread(target=_hopper)
_hopper_thread.daemon = True
_hopper_thread.start()

self.analog_sig_source_x_1 = analog.sig_source_c(samp_rate, 
analog.GR_COS_WAVE, 1e6, 1, 0)
self.connect((self.analog_sig_source_x_1, 0), (self.uhd_usrp_sink_0, 0))

def get_samp_rate(self):
return self.samp_rate

def set_samp_rate(self, samp_rate):
self.samp_rate = samp_rate
self.uhd_usrp_sink_0.set_samp_rate(self.samp_rate)
self.analog_sig_source_x_1.set_sampling_freq(self.samp_rate)

def main(top_block_cls=switch_on_click_debug_tx_retune, options=None):

tb = top_block_cls()
tb.start()
try:
raw_input('Press Enter to quit: ')
except EOFError:
pass
tb.stop()
tb.wait()


if __name__ == '__main__':
main()




PS: I look at the output on a spectrum analyzer and observe how the frequency 
changes.


















> Gesendet: Donnerstag, 27. Februar 2020 um 19:30 Uhr
> Von: "Lukas Haase" 
> An: "USRP-users@lists.ettus.com" 
> Betreff: Re: How do timed commands work for two blocks (USRP Sink+USRP 
> Source)?
>
> A quick update which may make things easier to debug: I am observing TX/RX on 
> a spectrum analyzer and see if the frequency changes.
> As soon as I enable timed command, the tune command is ignored!
>
> For simplicity, I am completely removing the RX parts (uhd_usrp_source_0).
>
> Now this works:
>
> tune_req_tx = uhd.tune_request()
> tune_req_tx.rf_freq_policy = uhd.tune_request.POLICY_MANUAL
> tune_req_tx.dsp_freq_policy = uhd.tune_request.POLICY_MANUAL
> tune_req_tx.rf_freq = 900e6
> tune_req_tx.dsp_freq = -2e6
>
> now = usrp_sink.get_time_now()
> #usrp_sink.set_command_time(now + uhd.time_spec(1))
> res1 = usrp_sink.set_center_freq(  tune_req_tx, 0)
> usrp_sink.clear_command_time()
>
> When this code is executed, the signal jumps by 2 MHz at the spectrum 
> analyzer.
>
> Now I only uncomment set_timed_command above:
>
> usrp_sink.set_command_time(now + uhd.time_spec(1))
>
> and repeat. NO frequency change any more!
>
> That means as soon as I use timed command (set_command_time) for changing the 
> DSP frequency on a TX it is just IGNORED!
>
> This must be a bug ... or do I really do something fundamentally wrong?
>
>
> USRP X310 with 2xUBX-160. TX/RX from dautherboard 1 is connected to spectrum 
> analyzer.
>
>
> Thank you!
> Lukas
>
>
>
> Lukas Haase wrote:
> > How do these timed commands work exactly when using USRP Source together 
> > with USRP Sink? (I need to phase-align RX and TX hence use timed commands 
> > at the same time).
> > Since they are both internally use the same hardware device (and board) I 
> > feel timed commands sent to both blocks result in some unpredictable 
> > results (at leas

[USRP-users] Device Recovery N210: JTAG programmer

2020-02-28 Thread Sumit Kumar via USRP-users
Hi,
I have 3 bricked N210 to be recovered. I was following the post
https://kb.ettus.com/N200/N210_Device_Recovery

It says JTAG programmer and in the picture I can see the model no. is
DLC9G.

I found something on Amazon which has the same model number but does not
looks the same. Can anyone confirm if this is correct.
https://www.amazon.fr/Plate-Forme-Compatible-lautolaveuse-programmable-XILINX/dp/B07Y7PBBGQ/ref=sr_1_1?__mk_fr_FR=%C3%85M%C3%85%C5%BD%C3%95%C3%91&keywords=DLC9G&qid=1582884943&sr=8-1


Regards
-- 
-- 
Sumit kumar
Postdoc
SnT, Luxembourg
___
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com