I’ve seen some discussion about the GPIOs on the LimeSDR on this post, but it hasn’t quite made it clear to me what the status of their implementation currently is.
I’m using the SoapySDR library to control the LimeSDR using my own c++ program, and need GPIO control using the J12 header, is there any way currently to do this? I noticed that the GPIO SoapySDR interface methods aren’t yet implemented, though should it still be possible to write to the GPIOs using the write register method? I’ve looked around for the FPGA register address for the J12 GPIO block, but haven’t had any success so far.
As a bit of background, I’m planning on using the GPIOs to control a switching network, to perform some measurements using a number of different antennas. SoapySDR seemed like a good choice, because I wanted to support the bladeRF we were using before the LimeSDR came along. If the case is that the GPIO support simply isn’t implemented yet, I’d be happy to volunteer some time on the code to try to get it going, though I have zero FPGA experience, so I might only be useful on the frontend. But I’m also willing to learn new tricks
Thanks, it’s much appreciated, @astancombe! I’ll leave it to Josh and Zack to look at what is required and consider how we might take you up on your kind offer.
I see there are calls in the LMS API to read and write to the GPIO pins now. I was wondering about the timing of the GPIO updates - how does the processing of the GPIO updates happen with respect to timing of trasmit samples? Might it be possible to sychronize outputs to GPIOs with the RF? Could GPIO output writes be tied to timestamps the same way the transmit RF can be?
Thanks @Zack, I see the page I linked was for v1.2 while the latest is 1.4. It can be quite confusing for someone who’s just new to it. I would advise to put a big disclaimer at the top of https://wiki.myriadrf.org/LimeSDR-USB_User_Guide
@astancombe We’re you able to control your switching network with the GPIO?
@andrewback@Zack I’ve seen the GPIO Board. There’s not much info about it. What improvements / additional capabilities does it add, as opposed to directly using the GPIO pins on the LimeSDR board?
Also the LimeSDR PCIe page looks a bit sad with just Coming Soon!. Does it work the same as the USB when it comes to GPIO?
I would also like to use a switch to switch between antennas. Now I just noticed that the switch I bought mentions DC blocking capacitors are required at ports RFC and RF1, 2, … Did you also had to use DC blocking capacitors on your setup? I’m pretty new to all this and was wondering if I really need them, and what type to use between inner, outer, inner/outer?
It really depends on the switch IC you are using and how you are using it. Some switch ICs have them inbuilt, though it sounds like yours does not - I am currently using mostly Peregrine switches and don’t need any blocking caps. You’ll have to read the datasheet for the recommended values and types, for example this murata switch recommends using 0402 330pF tin plated layer ceramic capacitors. If your datasheet doesn’t specify, you could probably use something recommended for a similar switch from a competitor. Generally it won’t matter a whole lot if it’s just for hobbyist applications, as long as a DC blocking capacitor of some value is there.
But it is really comming soon! It should be ready next week.
Good to know
Yes, it is the same. Just one difference - LimeSDR-PCIe board got 16 bits while LimeSDR-USB eight.
It’s strange, it seems I can only see 8 bits through Soapy
char GPIOBankName[] = "MAIN"; // There's only that one bank.
int result = SoapySDRDevice_writeGPIODir(sdr, GPIOBankName, 4095);
unsigned int gpioDirRead = SoapySDRDevice_readGPIODir(sdr, GPIOBankName); // I get 255
result = SoapySDRDevice_writeGPIO(sdr, GPIOBankName, 4095);
unsigned int gpioRead = SoapySDRDevice_readGPIO(sdr, GPIOBankName); // I get 255