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 Children
  • I did manage to get the AuxDACs operating by changing the initial value of auxDacEnable from 0 to 0x3FF in ad9371.c
    AD9371_OF_PROP("adi,aux-dac-enable-mask", &phy->mykDevice->auxIo->auxDacEnable, 0x3FF);
    and then using voltage2 to voltage11 output raw to write to the AuxDACs.

    Whilst I had the bonnet/hood up, I did manage to add access to the low voltage GPIO so that I can poke and peek P502 as well.

    Thank you for your assistance.