discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] USRP transient peak from lock, unlock, set decim/freq


From: Johannes Schmitz
Subject: [Discuss-gnuradio] USRP transient peak from lock, unlock, set decim/freq
Date: Tue, 12 Jul 2011 11:07:01 +0200

I am getting some kind of very strong transient peak when using lock
unlock and changing usrp decimation rate and frequency and in the
beginning.
Is this a normal behaviour?
So each time I reconfigure my system I have to throw away some samples
to avoid this peak or am I doing something wrong?

I made this short example program and the peak can be found at the
beginning of the logged data and somewhere in the middle. The
beginning peak only occurs sometimes. So make sure to run it several
times if you want to see it.
It happens in USRP1 as well as USRP2.

I hope somebody can confirm this or tell me that the problem has been
removed in newer gnuradio versions.

Johannes

#!/usr/bin/env python

from gnuradio import gr
from gnuradio import usrp
from gnuradio import usrp2
from gr_tools import log_to_file

from time import sleep

class top_block(gr.top_block):
    def __init__(self):
        gr.top_block.__init__(self, "fusb error")

        self.u = usrp.source_c ()
#        self.u = usrp2.source_32fc('eth1')

        self.sink = gr.null_sink(gr.sizeof_gr_complex)
        self.connect(self.u, self.sink)

        log_to_file(self, self.u, "data/test_u.compl")

    def reconfigure(self):
        self.lock()
        sleep(1)
        print 'lock'
        self.unlock()
        print 'unlock'

if __name__ == '__main__':
    app = top_block()
    app.start()
    sleep(1)
    print 'start'
    app.reconfigure()
    print "reconfigured"
    sleep(1)
    print 'now stopping'
    app.stop()
    print 'stopped'



reply via email to

[Prev in Thread] Current Thread [Next in Thread]