# UHD + USRP2: altering AD9510+AD9777 config settings

**URL:** <https://www.ruby-forum.com/t/uhd-usrp2-altering-ad9510-ad9777-config-settings/204303>\
**Category:** GNU Radio\
**Created:** [March 9, 2011, 1:17pm UTC](https://www.ruby-forum.com/t/uhd-usrp2-altering-ad9510-ad9777-config-settings/204303 "2011-03-09T13:17:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [March 9, 2011, 1:17pm UTC](https://www.ruby-forum.com/t/uhd-usrp2-altering-ad9510-ad9777-config-settings/204303/1 "2011-03-09T13:17:35Z")

</div>

(Apologies for this repeat message; my original message didn’t seem to  
appear on the mailing list archive.)

Hi folks,

I’m writing a basic C++ UHD app to control some custom hardware on the  
USRP2/N210; I’m using the multi\_usrp class. I need the USRP2 to  
continue sending out internally-generated data through the AD9777 DAC  
even after my host app closes. Problem is, UHD seems to tell the  
AD9777 to enter sleep mode at this point; is there any way to alter  
this default behaviour short of modifying the UHD source?

A broader question is how to control the initial configuration of the  
AD9510 and AD9777 when the host connects to the USRP2. I understand  
this is a bit low-level for the spirit of UHD, but please let this  
newbie know if there’s an elegant way to do this.

Another option would be disabling host-based modification of the  
AD9510 and AD9777 settings entirely; I’ve modified the ZPU firmware to  
configure them upon boot-up so I don’t really need it (though it may  
be useful to keep).

Thanks in advance,

Vlad

---

<div class="post-metadata">

**Author:** ![vladimir\_n](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/b2d939/32.png) [@vladimir\_n](https://www.ruby-forum.com/u/vladimir_n)\
**Post date:** [March 9, 2011, 7:20pm UTC](https://www.ruby-forum.com/t/uhd-usrp2-altering-ad9510-ad9777-config-settings/204303/2 "2011-03-09T19:20:48Z")

</div>

On Wed, 2011-03-09 at 23:16 +1100, Vladimir Negnevitsky wrote:

> this default behaviour short of modifying the UHD source?
> 
> A broader question is how to control the initial configuration of the  
> AD9510 and AD9777 when the host connects to the USRP2. I understand  
> this is a bit low-level for the spirit of UHD, but please let this  
> newbie know if there’s an elegant way to do this.

It’s all in host/lib/usrp/usrp2/codec\_ctrl.cpp. Just comment out some  
stuff in the destructor. And on init, the setup is in the constructor.  
Can I ask what you’re up to with the custom settings?

–n

---

<div class="post-metadata">

**Author:** ![vladimir\_n](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/b2d939/32.png) [@vladimir\_n](https://www.ruby-forum.com/u/vladimir_n)\
**Post date:** [March 10, 2011, 8:44am UTC](https://www.ruby-forum.com/t/uhd-usrp2-altering-ad9510-ad9777-config-settings/204303/3 "2011-03-10T08:44:09Z")

</div>

Worked like a charm; thanks very much!

I’ve replaced the USRP2 DSP chain with a control loop for diode laser  
stabilisation (the USRP2 has nice ADCs and DACs!); without going into  
detail it consists of an FM generator and a coherent demodulator. I’m  
controlling their parameters (carrier freq, mod freq, phase, gain,  
etc) through the ZPU using settings registers, which are set to  
reasonable values by the ZPU upon boot-up - now using the UHD drivers  
I plan to write an app allowing host-based alteration of settings. To  
do this I added a few methods to multi\_usrp; now I’m writing a basic  
app to use them.

Regards,

Vlad
