This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/TM4C123GH6PM: SPI interface to AD4001 ADC

Part Number: TM4C123GH6PM

Tool/software: Code Composer Studio

Hello All -

I have been tasked with prototyping part of a system.  I am using a TM4C123G Tiva Launchpad and I need to interface to an AD4001 ADC.  The ADC offers multiple SPI 3 and 4 wire configurations.  My task involves sampling the ADC at 4kHz.

I am new to SPI and right now I'm struggling with the electrical connections.  I've been looking at the SSI connections available on the booster pack pins, but I'm not sure how to hook this thing up.  I am considering the *CS Mode, 3-Wire with busy indicator mode.  If I'm understanding the datasheet correctly, I'll need a GPIO to start the conversion (CNV pin on the ADC)?  

As always, I'm pushed for time and need to get this working ASAP, so any advice is appreciated!

  • Hi Brian,
    If 3-wire with busy indicator is the mode you need for your application then you can use a GPIO to start the conversion. The SDO from the AD4001 will connect to the SSIRX of the MCU and the SCK from the ADC will connect to the SSICLK of the MCU. You will configure one of the GPIO pins in the MCU for interrupt generation according to the figure shown in the AD4001 datasheet.
  • Honestly I chose that method because it looked simpler.  I haven't been able to get it to work.  Right now I have the following connection to the AD4001: (4-wire)

    SSIOTx PA5 to SDI

    SSIORx PA4 to SDO

    SSIOFss PA3 to CNV

    SSIOCLK PA2 to SCK

    I can see the clock on the scope, and see the CNV pin go low, but I get no data back.

  • I should mention that I only see the clock on the send, nothing on the receive.
  • I have doubt the connection will work. You need to also check the timing. The AD4001 says the rising edge of CNV to rising edge of SCK is 190ns. What SSICLK frequency are you configuring to meet this timing requirement?
    Another thing is that in order to put the AD4001 in CS mode you need to have SDI high when CNV rises. What mode (freescale or TI mode) have you configured? When you are in freescale mode the SSITX will be low when the SSIFss is inactive. There maybe problem to put the AD4001 in CS mode if you use SSIFSS to drive CNV. Look at the scope and check if all timings are met. I'm not familiar with AD4001. Please consult Analog Device for advice too.
  • Is it not true that the Master SPI clock - perhaps on a different signal edge - clocks (both) transmit AND receive?      You cannot (only) receive SPI data - always there must be transmit activity. (even if you're sending "dummy" data...)

    All of the suggestions by Charles ring true.    It is your job to choose the "best SPI frame format match" between your MCU and your external SPI target.     (always this involves opening both data sheets - and carefully determining which of the MCU's SPI modes "best fits" your target device.    This is so as the external device is unlikely to provide the "flexibility" offered by your MCU - thus the external device - while an SPI Slave - is "the boss" of your Frame Format selection!)    

    Once that "device to device" SPI Frame config. has been determined - you must carefully review the timing diagrams of (both) devices - to insure no violations occur.    (one last "gotcha.")