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.

ADS8168: No SDO response from ADS8168

Part Number: ADS8168

Hello,

I'm currently trying to establish the SPI communication with the ADS8168, but I don't get any data back. Maybe somebody has a clue what I've been missing?

My configuration is as follows:

- STM32F4 Discovery board as SPI master

- Two ADS8168 ADCs as SPI slaves (MOSI and MISO signals in parallel; two /CS signals for selecting the ADCs).

Using the ST's Standard Peripheral Library for configuring the SPI unit on the µC as follows:

RCC_APB1PeriphClockCmd(RCC_APB1Periph_SPI2, ENABLE);

SPI_InitTypeDef SPI_InitStructure;
SPI_InitStructure.SPI_Direction = SPI_Direction_2Lines_FullDuplex;
SPI_InitStructure.SPI_Mode = SPI_Mode_Master;
SPI_InitStructure.SPI_DataSize = SPI_DataSize_8b;
/*
 * SPI protocol SPI-00
 */
SPI_InitStructure.SPI_CPOL = SPI_CPOL_Low;
SPI_InitStructure.SPI_CPHA = SPI_CPHA_1Edge;

SPI_InitStructure.SPI_NSS = SPI_NSS_Soft;
SPI_InitStructure.SPI_BaudRatePrescaler = SPI_BaudRatePrescaler_4;
SPI_InitStructure.SPI_FirstBit = SPI_FirstBit_MSB;
SPI_Init(SPI2, &SPI_InitStructure);

/* Enable TI mode for SPI2 */
SPI_TIModeCmd(SPI2, ENABLE);
/* Enable SPI2 */
SPI_Cmd(SPI2, ENABLE);

And the following to set the AIN to AIN1 and then read out the register again (both for ADC1 - for which I use GPIOB_11 as /CS output):

/* 00001 00000011101 00000001 => 0000 1000 0001 1101 0000 0001 => 0x08 0x1D 0x01
 * 00010 00000011101 00000000 => 0001 0000 0001 1101 0000 0000 => 0x10 0x1D 0x00*/
uint16_t SPI2_Buffer_Tx[BufferSize] = {0x08, 0x1D, 0x01, 0x10, 0x1D, 0x00, 0x00, 0x00, 0x00};
uint16_t SPI2_Buffer_Rx[BufferSize];
uint32_t TxIdx = 0, RxIdx = 0;

GPIO_ResetBits(GPIOB, GPIO_Pin_11);

while (TxIdx < BufferSize)
{
	/* Send SPI2 data */
	SPI_I2S_SendData(SPI2, SPI2_Buffer_Tx[TxIdx]);
	/* Wait for SPI2 data reception */
	while (SPI_I2S_GetFlagStatus(SPI2, SPI_I2S_FLAG_RXNE) == RESET);
	/* Read SPI2 received data */
	SPI2_Buffer_Rx[RxIdx] = SPI_I2S_ReceiveData(SPI2);
	TxIdx++;
	RxIdx++;
	if((3 == TxIdx) || (6 == TxIdx))
	{
	                GPIO_SetBits(GPIOB, GPIO_Pin_11);
			Delay(0x000002);
			GPIO_ResetBits(GPIOB, GPIO_Pin_11);
		}
	}

	GPIO_SetBits(GPIOB, GPIO_Pin_11);

 I checked that all signals (and supply voltages) are present at the ADS8168 pins, but there's no response on the MISO line ever...

Here's a scope image (CH1: SCLK; CH2: MOSI; CH3: MISO; CH4: /CS1):

Anybody having some hint for me?

Also, I got another question: How to only read out ADC values from this ADC (e.g. when in manual mode). Do I only need to send the NOP command and read the input buffer of the next transmission frame or do I need some dedicated "Read values" command?

Kind regards,

Markus

  • Hello Markus,

    Can you confirm the DC voltages that you have applied to the device?

    1. REFP? Should be 4.096V if using the internal reference. AVDD and DVDD voltages as well.
    2. Confirm that DECAP pin measures ~2.85V.
    3. ADC-INM should be connected to ground.
    4. ADC-INP should read whatever you have on AIN1.

    You may want to connect an input signal directly to the ADC-INP just to bypass the Mux until you get the communications working.
    Also, referring to your above timing diagram, bring /CS low a forth time and issue another 24 SCLK's to see if you can get a response.

    Regarding your last question, once the part is configured, you can keep SDI low (NOP) and read the buffer on each frame for the next conversion data. There is no dedicated 'Read Value' command needed.

    This could also be a timing issue. If possible, please provide a zoomed in capture of SCLK relative to the /CS and SDI pins.

    Thank you,

    Regards,
    Keith N.
    Precision ADC Applications
  • Hello Keith,

    thanks for your quick response!

    Checking the HW signals again (with a multimeter), I found the following:

    DC1 (IC8):

    Pin30 (DVDD): 3.294V

    Pin32 (AVDD): 5.013V

    Pin2 (DECAP): 3.092V

    Pin5 (REFP): 0.000V

    Pin6 (REFP): 0.000V

    Pin 20 (ADC-INM): 0V

    Pin 17 (ADC-INP): 3.372V

    Pin 9 (AIN0): 3.371V

    Pin 10 (AIN1): 0.160V

    Powering Discovery board (so, the MUX should now switch to AIN1)

    => Pin 17 (ADC-INP) has same signal as Pin 9 (AIN0), not Pin 10 (AIN1)

     

    ADC2 (IC9):

    Pin30 (DVDD): 3.294V

    Pin32 (AVDD): 5.012V

    Pin2 (DECAP): 3.080V

    Pin5 (REFP): 0.000V

    Pin6 (REFP): 0.000V

    Pin 20 (ADC-INM): 0V

    Pin 17 (ADC-INP): 3.373V

    Pin 9 (AIN0): 3.371V

    Pin 10 (AIN1): 0.294V

    Powering Discovery board (so, the MUX should now switch to AIN1)

    => Pin 17 (ADC-INP) has same signal as Pin 9 (AIN0), not Pin 10 (AIN1)

    So, according to your hint, I guess there's some problem with the internal reference. So I check up on this.

    Meanwhile I have also tried adding another 24 SCLKs and /CS signal, but to no avail:

    By the way, I've also reduced the baudrate (but that didn't help either).

    Also, the Discovery board uses a 3V reference, while we're using 3.3V supply voltage for the ADS8168. But as far as I've been able to find out, this should be no problem with the logical levels.

    For the timings, I've also produced some zoomed in scope images:

    Obviously, the ADC doesn't switch the MUX in response to my command sent, but I think this is not a big problem in our case, since I guess the ADC input of AIN0 should also cause some result unequal to 0 (however, we're having only about 100mV of input there).

    Thanks for your explanation concerning the reading out of ADC values!

    Kind regards,

    Markus

  • Hi Markus,

    Thanks for sharing the detailed plots and voltage measurements. The expected voltage on DECAP pin is 2.8V whereas your measured voltage on this pin is 3V. It looks like the device is in reset state.

    Can you please check if the RST pin (pin# 29) is pulled high or low? If the RST pin is low, the device will be in reset state.

  • Hello Rahul,

    thanks for your hint - it turned out that the /RST pin is floating... Don't know why I overlooked it when I checked the schematics yesterday...
    So I guess this is the problem... Will check next week whether I can fix this.

    Kind regards and have a nice weekend,

    Markus
  • Hello,

    I now was able to connect /RST (pin 29) to 3V3 (pin 30) and the ADC now answers via SPI!

    Thanks again for you help,

    kind regards,

    Markus

  • Hi Markus,

    I appreciate you posting the outcome of this debug. The detailed information in your question was helpful in narrowing down the possibilities.