ADAR1000-EVAL Automated Control via SPI

I'm trying to put together a simple test setup using the ADAR1000-EVAL board. My hope was to connect via SPI and a Raspberry Pi 3 B+ and send the appropriate register commands to change the phases and amplitudes in a set manner from Python.

I had gotten the SDP-B and the Windows software and have played around with the basic GUI. I've successfully run the example script: RX1_MaxG_45.txt from that interface. Upon taking that board out of the picture, I switched to my raspberry pi setup, and connected the CE, MOSI,MISO,SCLK lines from the Pi GPIO to the relevant lines on the P3 interface.

I've got CPOL and CPHASE set to 0, with a max bus speed set to 50,000 Hz. I basically then send the registry address data followed by the data via the spi interface through Python, stepping through all the commands from RX1_MaxG_45.txt. However this does not seem to work; I have a continuous wave signal going directly into port RX1 and a spectrum analyzer hooked up to the RF_IO port. When operating with the SDP-B, I can see it go from no signal to a strong peak immediately after running through all the commands in the example script. However when trying through the SPI on the Pi, I only was successful at activating a signal twice - seemingly randomly out of the dozen of times I was mucking around with code. Why? I have no idea...

Which brings me to my questions: 

1. Writing to registry 0, 0x0018 activates SDO and a 4 wire spi = but SDO is a 1.8V line - is that converted to 3.3V anywhere (i.e. the MISO line on P3)? I initially have just hooked up the MOSI, MISO, SCLK lines on the P3 connector and am going to the PI, yet I don't see anything signal coming in on the MISO line. 

2. If I skip writing 0x0018, does that keep it in 3 wire spi mode? 

3. Is there a simpler way to utilize the existing driver written for the windows eval software to interact with the board such that I can change phases and attenuators or an alternative to reading the SPI from the raspberry pi that anyone could recommend?

Thanks in advance!

Parents
  • I would like to ask just a few house keeping questions.  Please confirm:

    1) Your CE (CSB) line is active low?

    2)  Your total bit payload length is 24 bits for each Write?

    3)  The first bit you write is the Read/Write bit, ;'1' to initiate at Read or a '0' to initiate a Write

    4)  You expect data to be clocked in on the rising edge of the SCLK signal

    5)  Unless you've changed the setting in Reg 0x00, you clock in MSB first in the following order: [R/W bit] [15 Address Bits] [8 Data Bits]

    6)  All the Timing Specifications are being met shown on Page 6 of the datasheet?

    Can you observe what you are writing with an oscilloscope?  When de-bugging the SPI I like to capture all four of the lines to make sure I'm writing what I think I'm writing. 

    Answers to your questions:

    1)  Writing 0x0018 should active the SDO pin and make it a 4-wire bus.  The 3.3V to 1.8V logic transform is done by the U5 and U2 chips on the eval for the SPI lines.  The MISO line on P3 goes through the U5 level translator.

    2)  Yes, skipping the 0x0018 Write will keep the SPI in 3-wire mode.  And unless you probe with a scope right at the SDIO pin, you will not see any data being read back from the part because the U5 level translator is set to be uni-directional.

    3)  I'm not familiar with the raspberry pi, so I cannot help you on that front unfortunately.  Assuming it runs a standard SPI engine that can read and write multiples of 8-bit words, we should be able to get it to work with the ADAR1000. 

Reply
  • I would like to ask just a few house keeping questions.  Please confirm:

    1) Your CE (CSB) line is active low?

    2)  Your total bit payload length is 24 bits for each Write?

    3)  The first bit you write is the Read/Write bit, ;'1' to initiate at Read or a '0' to initiate a Write

    4)  You expect data to be clocked in on the rising edge of the SCLK signal

    5)  Unless you've changed the setting in Reg 0x00, you clock in MSB first in the following order: [R/W bit] [15 Address Bits] [8 Data Bits]

    6)  All the Timing Specifications are being met shown on Page 6 of the datasheet?

    Can you observe what you are writing with an oscilloscope?  When de-bugging the SPI I like to capture all four of the lines to make sure I'm writing what I think I'm writing. 

    Answers to your questions:

    1)  Writing 0x0018 should active the SDO pin and make it a 4-wire bus.  The 3.3V to 1.8V logic transform is done by the U5 and U2 chips on the eval for the SPI lines.  The MISO line on P3 goes through the U5 level translator.

    2)  Yes, skipping the 0x0018 Write will keep the SPI in 3-wire mode.  And unless you probe with a scope right at the SDIO pin, you will not see any data being read back from the part because the U5 level translator is set to be uni-directional.

    3)  I'm not familiar with the raspberry pi, so I cannot help you on that front unfortunately.  Assuming it runs a standard SPI engine that can read and write multiples of 8-bit words, we should be able to get it to work with the ADAR1000. 

Children