This looks fine. Two questions: - Have you double-checked the pin mapping? ( https://uhd.readthedocs.io/en/latest/page_usrp_x3x0.html#x3x0_hw_gpio) - Are you querying this during operation of your app, or do you let the app terminate and then measure voltages?
--M On Fri, Sep 27, 2024 at 8:59 PM Will Haftel via USRP-users < usrp-users@lists.ettus.com> wrote: > Hi, > > > I am attempting to manually control certain GPIO pins on the x310 as > outputs that will control external antenna sources. In the code sample > below, I am intending to set pin 2 to low and pins 3/4 to high, but am not > having any luck. Would it be possible to point out if there is something > wrong in this code? > > > usrp->set_gpio_attr("FP0", "CTRL", 0x000, 0xFFF); > > usrp->set_gpio_attr("FP0", "DDR", 0xFFF, 0xFFF); > > usrp->set_gpio_attr("FP0", "OUT", 0, (1<<2)); > > usrp->set_gpio_attr("FP0", "OUT", 1, (1<<3)); > > usrp->set_gpio_attr("FP0", "OUT", 1, (1<<4)); > > > Thank you! > > Will > _______________________________________________ > USRP-users mailing list -- usrp-users@lists.ettus.com > To unsubscribe send an email to usrp-users-le...@lists.ettus.com >
_______________________________________________ USRP-users mailing list -- usrp-users@lists.ettus.com To unsubscribe send an email to usrp-users-le...@lists.ettus.com