[USRP-users] using GPIO pins on daughter boards
josh at joshknows.com
Fri Nov 26 12:03:35 EST 2010
On 11/26/2010 02:35 AM, Andre Puschmann wrote:
> Hi all,
> I am trying to use the GPIO pins as outputs on a WBX daughter board and
> I am wondering about the right way.
> According to the docs and some posts earlier this year on the list
> io_tx[14:8] are available for use. So I picked io_tx.
> By default, all pins are set to function as inputs so I have to
> configure them as outputs first.
> Unfortunately, there is no function like "get_gpio_ddr()" within the
> dboard interface. That's why I used TXIO_MASK defined in db_wbx.cpp in
> order to make sure not to taint the current configuration. Is that
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.
> 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
More information about the USRP-users