Post Go back to editing

Configuring SDP-S as SPI interface via USB

Category: Hardware
Product Number: EVAL-SDP-CS1Z
Software Version: 2.4.0.301

The product page for the SDP-S states:

  • USB to Serial Engine
  • 1 xsmall footprint 120 Pin Connector
  • Configurable interface ( SPI, I2C, GPIO)
  • USB 2.0 interface to the PC

I currently have a EVAL-ADF4371 and would like to communicate via the SDP-S USB connection directly with the ADF4371 from my own code. I have only seen examples of hard connecting to the boards SPI pins to speak with the ADF4371 registers in Linux, but I'm able to use the ACE software in windows with no issues. There must be an interface for connecting to the device.

I looked in libiio and am not able to get it to recognize the SDP-S or the ADF4371 via a USB connection.

Does anyone know a work around for this or know how to configure the SDP-S?

Parents
  • Hi GTRIDev, I've replied to one of your other posts elsewhere. I recently took on responsibility for supporting the SDP-S. Primarily supporting the hardware and to a certain extent the background API that ACE and other packaged software use to communicate with the SDP-S. That  background API is not available to the public. The libiio/pyadi-iio sounds like the only way to use the board outside of ACE if you don't want to start from zero. I'm not familiar with pyadi-iio unfortunately.

    Essentially, are you looking for a way to send SPI commands from Linux/Windows to the EVAL-ADF4371? 

    If you are writing your own code, the SDP-K1 may be a better tool? SDP-K1 Evaluation Board | Analog Devices

    It features the same 120 pin connector as the SDP-S and you can program it using the STM32 HAL layer from IAR or Keil. Usually I would say you can use MBED too, but the ADF4371 uses 3 wire / Half Duplex SPI which is not supported by default in MBED. In fact this 3 wire interface may cause problems with other alternative workarounds.

    I know for a fact that the SDP-K1 using STM32 HAL commands can be used to read/write 3 wire SPI. But you are getting deep into the configuration of the STM32F469 at that stage compared to using python with the pyadi-iio library!

  • From what we have learned even if we are able to use the SPI on the SDP there is no guarantee that libiio will recognize it on windows. At this point we have used the record feature in ACE to export macros as python and created our own application for controlling the device that way. The only downside is that ACE must be open for the communication to work. We are trying to narrow down which files/services are required to be active and possible launch them manually to avoid have to open ACE.

    Is there any other information you can give about the background API that communicates with the SDP from ACE? If we can integrate even a small portion it would solve our problem.

  • That background API is definitely not available to the public. I'll talk to some people about ACE and libiio and see what I can come up with.

  • Any update on the API? We are still facing two major issues. 1, ACE software must be open in order to control the device from python. 2, We have two devices and need to be able to choose a specific device to configure. We used this post to connect to the device.

    https://ez.analog.com/data_converters/precision_dacs/f/discussions/538362/faq-how-to-control-adi-dac-evaluation-boards-evb-using-python-scripts

    If you notice on line 51 of the code in that post there is a method called "client.AddByComponentId("AD5679RBoard")". While i was debugging i see there is also a method called "AddByHardwareId". This would be useful for choosing a specific device assuming they have different hardware IDs. I'm just not sure where to find, how to determine, or the format of the hardware ID used for this method.

Reply Children
  • Hi there, I'm facing similar issues recently with SDP-S + ADMV8818 EVAL board.

    I'm also looking forward for a solution to the first issue you mentioned. It would be great if we can skip the ACE software, or even just a method to start it in the background, instead of manually open it every time.

    For your second issue, you can try the client.ListHardwareIds() method. It will list the Hardware IDs of all the boards connected, so you can find the ID of a specific board by connecting only one board. I found this ID is specific to the SDP-S board connected, and it doesn't care what daughter board is attached. Hopefully this is not a issue since there is usually only one daughter board connected to each SDP-S.

  • Chaoz, thanks for that info on the ACE hardware id - I had looked for that information but hadn't received it.