[Discuss-gnuradio] How to change SPI clock rate on USRP2?

2011-11-15 Thread Sriharsha Puranik
Hi all,

Is there a way to change the SPI clock rate on USRP2? (I am using uhd)

I found a similar question for E100 here -
http://comments.gmane.org/gmane.comp.hardware.usrp.e100/1257 . Is this
solution applicable to USRP2 also?

Also, I found some variable in - /firmware/zpu/lib/spi.c spi_regs-div =
1;  // 0 = Div by 2 (25 MHz); 1 = Div-by-4 (12.5 MHz) Can I increase the
value to 2? Will that make the clock speed 6.25 MHz?

Thanks,
Sriharsha Puranik.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] Daughter board driver

2011-11-06 Thread Sriharsha Puranik
Hi all,

I am writing a UHD driver for a new daughter board. I am having some
problem regarding the GPIO/ATR register settings. I am able to use the
daughter board with USRP1, but not with USRP2. With USRP2, I think,
uhd_fft.py just shows noise.

In the receiver class (inherited from rx_dboard_base), I am setting these
registers like this -

#define TX_EN  (1  6)

this-get_iface()-set_clock_enabled(dboard_iface::UNIT_RX, true);
this-get_iface()-set_gpio_out(dboard_iface::UNIT_RX, TX_EN );
this-get_iface()-set_gpio_ddr(dboard_iface::UNIT_RX, TX_EN );


//setup the rx atr (this does not change with antenna)
this-get_iface()-set_atr_reg(dboard_iface::UNIT_RX,
dboard_iface::ATR_REG_IDLE,0);
this-get_iface()-set_atr_reg(dboard_iface::UNIT_RX,
dboard_iface::ATR_REG_FULL_DUPLEX, TX_EN);

this-get_iface()-set_pin_ctrl(dboard_iface::UNIT_RX, TX_EN);

But, USRP1 also works when I comment this piece of code. Can some one help
me out with this?

I dont know much about the GPIO and ATR registers. Can some one point me to
some documents?

Thanks,
Sriharsha Puranik.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] Segmentation Fault

2011-10-18 Thread Sriharsha Puranik
Hi all,

I am facing Segmentation Fault error.

My setup is - Ubuntu 11.04, USRP2 with WBX board, gnuradio.

The scenario is - When I run uhd_fft.py, I get the following -

(gdb) run /usr/local/bin/uhd_fft.py
Starting program: /usr/bin/python /usr/local/bin/uhd_fft.py
[Thread debugging using libthread_db enabled]
linux; GNU C++ version 4.5.2; Boost_103700; UHD_003.003.000-25f0bd5

[New Thread 0x7fffe1adf700 (LWP 26034)]
[New Thread 0x7fffe12de700 (LWP 26035)]
usrp_source make
Making
-- Opening a USRP2/N-Series device...
[New Thread 0x7fffe0add700 (LWP 26036)]

UHD Warning:
The recv buffer could not be resized sufficiently.
Target sock buff size: 5000 bytes.
Actual sock buff size: 131071 bytes.
See the transport application notes on buffer resizing.
Please run: sudo sysctl -w net.core.rmem_max=5000

UHD Warning:
The recv buffer could not be resized sufficiently.
Target sock buff size: 5000 bytes.
Actual sock buff size: 131071 bytes.
See the transport application notes on buffer resizing.
Please run: sudo sysctl -w net.core.rmem_max=5000

UHD Warning:
The send buffer could not be resized sufficiently.
Target sock buff size: 1048576 bytes.
Actual sock buff size: 131071 bytes.
See the transport application notes on buffer resizing.
Please run: sudo sysctl -w net.core.wmem_max=1048576

Program received signal SIGSEGV, *Segmentation fault*.
[Switching to Thread 0x7fffe0add700 (LWP 26036)]
0x757d6973 in std::_Rb_tree_increment(std::_Rb_tree_node_base*) ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(gdb) backtrace
#0  0x757d6973 in std::_Rb_tree_increment(std::_Rb_tree_node_base*)
()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#1  0x7419bc68 in tls_destructor ()
   from /usr/lib/libboost_thread.so.1.42.0
#2  0x7419e177 in thread_proxy ()
   from /usr/lib/libboost_thread.so.1.42.0
#3  0x77bc4d8c in start_thread ()
   from /lib/x86_64-linux-gnu/libpthread.so.0
#4  0x76a8a04d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#5  0x in ?? ()
(gdb)

*
*
The UHD logs file has been attached with the mail.

Also, USRP1 with uhd_fft.py is working fine. USRP2 works fine if there is no
UI involved (that is - /usr/local/share/uhd/examples/rx_ascii_art_dft
 --freq 900e6 --rate 1e6 --dyn-rng 120 works fine).

Can some one please take a look at this problem?

Thanks,
Sriharsha Puranik.


-- 2011-Oct-18 19:27:04.286141 - level 1
-- static void uhd::device::register_device(const uhd::device::find_t, const uh
-- lib/device.cpp:69

registering device



-- 2011-Oct-18 19:27:04.286302 - level 1
-- static void uhd::device::register_device(const uhd::device::find_t, const uh
-- lib/device.cpp:69

registering device



-- 2011-Oct-18 19:27:04.286346 - level 1
-- static void uhd::device::register_device(const uhd::device::find_t, const uh
-- lib/device.cpp:69

registering device



-- 2011-Oct-18 19:27:04.286481 - level 1
-- void register_dboard_key(const dboard_key_t, uhd::usrp::dboard_base::sptr (*
-- lib/usrp/dboard_manager.cpp:94

registering: TVRX2



-- 2011-Oct-18 19:27:04.286532 - level 1
-- void register_dboard_key(const dboard_key_t, uhd::usrp::dboard_base::sptr (*
-- lib/usrp/dboard_manager.cpp:94

registering: DBSRX2



-- 2011-Oct-18 19:27:04.286574 - level 1
-- void register_dboard_key(const dboard_key_t, uhd::usrp::dboard_base::sptr (*
-- lib/usrp/dboard_manager.cpp:94

registering: TVRX



-- 2011-Oct-18 19:27:04.286600 - level 1
-- void register_dboard_key(const dboard_key_t, uhd::usrp::dboard_base::sptr (*
-- lib/usrp/dboard_manager.cpp:94

registering: Unknown TX



-- 2011-Oct-18 19:27:04.286623 - level 1
-- void register_dboard_key(const dboard_key_t, uhd::usrp::dboard_base::sptr (*
-- lib