[USRP-users] using GPIO pins on daughter boards

Josh Blum josh at joshknows.com
Fri Nov 26 13:21:44 EST 2010

On 11/26/2010 01:09 PM, Andre Puschmann wrote:
> Hi,
> On 11/26/2010 06:03 PM, Josh Blum wrote:
>> Yes, as it stands. Set the DDR to TXIO_MASK | (1<<  8). You can safely
>> set the GPIO and not interfere with the operation of the db_wbx.cpp code
>> because the pins in TXIO_MASK are under ATR hardware control.
>> A readback or mask option sounds like a useful addition to the
>> daughterboard interface for GPIO configurations.
> Thanks, I already have something in the pipe (at least for the USRP2 and
> e100). Attached you'll find a simple patch for this. However, I am not
> sure how to handle the pin definitions (i.e. TXIO_MASK). Should we
> create separate header files for each and every daughterboard?

Just copy the value of TXIO_MASK in your application (for now).

I will find a way to work a shadow and some new API calls into the
interface (the gpio registers are not necessarily capable of readback).

>>> Moreover, I observed that my IO settings are set back to default after
>>> my program terminated. Is it possible to set them permanently or am I
>>> doing something wrong?
>> The decontruction routine sets all GPIOS to inputs. Thats what you are
>> seeing.
> Actually, the destructor of class wbx_xcvr in db_wbx.cpp is empty. Or is
> this done anywhere else?

The dboard_manager object. Look for set_nice_gpio in dboard_manager.cpp


More information about the USRP-users mailing list