Post Go back to editing

ADRV9371 GPIO

Hi!

I have an ADRV9371-W/PCBZ card from Analog Devices. It is a 2 channel radio card.

So I am using Linux to control the radio, and I want to write a bash script to automate what I am doing(I don't know much about C programming). I'm using the commands from this page which lets me change the frequency that comes out of the transmitter.

There is also a bunch of header pins labelled P502 which look like they are supposed to be GPIOs. I'd like to use these pins for blinking some status LEDs. What I'm worried about is that I think the radio chip on this card can sometimes use these GPIOs for other things, and I don't want to break anything.

On the IIO Oscilloscope webpage it looks like you can manually configure the GPIOs to do what you want, so I figure there must be some kind of command to make the radio chip not use the GPIO pins.

Can someone tell me what the command line instruction would be to set the GPIOs to user mode? And what the command would be to set the voltage level?

I'm guessing the command should be something like

root:/sys/bus/iio/devices/iio:device3> echo 0 > out_altvoltage1_GPIO

because that's kind of what all the other commands look like. I just don't know what exactly it is.

Thanks for your help!

-Ryan

Parents Reply
  • Michael,

    I would like to use the 3.3 V GPIO port to control an external PA and LNA.

    Is it possible to control this via the IIO interface?

    I see that some controls are exposed during iio_info but not the write register:


    debug attr 49: adi,gpio-3v3-src-ctrl11_8 value: 3
    debug attr 50: adi,gpio-3v3-src-ctrl7_4 value: 3
    debug attr 51: adi,gpio-3v3-src-ctrl3_0 value: 3
    debug attr 52: adi,gpio-3v3-oe-mask value: 0

    Many thanks

    Shaun Cummins

Children