[prev in list] [next in list] [prev in thread] [next in thread]
List: usrp-users
Subject: Re: [USRP-users] B200mini GPIO - does not work as expected
From: "Harald Fritzsche \(DD0VS\) via USRP-users" <usrp-users () lists ! ettus ! com>
Date: 2020-02-16 20:00:06
Message-ID: 20200216210006.14ff17aa () dd0vs ! de
[Download RAW message or body]
Hello All,
got it running.
Here is the code :-)
// GPIO PIN 1 is used for TX/RX Control manual (no ATR)
// GPIO PIN 2-4 are used for Band Setting manual (no ATR)
// -> 0x0F is the mask , 0x0 -> manual (0x1 = ATR)
usrp->set_gpio_attr("FP0", "CTRL", 0x00, 0x0F);
// setting Data DiRection 0x1 = output
usrp->set_gpio_attr("FP0", "DDR", 0x0f, 0x0F);
// reset GPIO pin 0,1,2,3
usrp->set_gpio_attr("FP0", "OUT", 0x00, 0x0F);
Main issue is in the line with "DDR" :-) (0x0f was 0x01) in combination
with a typo later in the code which covered the issue.
Regards vy73
Harald
DD0VS
Am Sun, 16 Feb 2020 17:09:20 +0100
schrieb "Harald Fritzsche \(DD0VS\) via USRP-users"
<usrp-users@lists.ettus.com>:
> Hello All,
>
> i am am using SoDaRadio on a Raspberry Pi4 with B200mini. Operation is
> confirmed, but w/o GPIO because original software is not enabling the
> use of GPIOs for B200mini.
> Now i want to make use of the GPIOs to trigger switching a TX/RX
> relay.
>
> I am sending this:
>
> // GPIO PIN 1 is used for TX/RX Control manual (no ATR)
> // GPIO PIN 2-4 are used for Band Setting manual (no ATR)
> // -> 0x0F is the mask , 0x0 -> manual (0x1 = ATR)
> usrp->set_gpio_attr("FP0", "CTRL", 0x000, 0x00F);
> // setting Data DiRection 0x1 = output
> usrp->set_gpio_attr("FP0", "DDR", 0x1, 0x00F);
> // reset GPIO pin 0,1,2,3
> usrp->set_gpio_attr("FP0", "OUT", 0x000, 0x00F);
>
> I would expect that GPIO pins 0,1,2,3 are set to 0V, but alle PIN are
> high as after poweroff.
>
> Need your help.
>
> Regards vy73
> Harald
> DD0VS
>
> _______________________________________________
> USRP-users mailing list
> USRP-users@lists.ettus.com
> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
_______________________________________________
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic