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.

ADS8661: Not able to read 1msps?

Part Number: ADS8661

Hello,

    I am using stm32h7, and I am able to read 12 bit ADC values from ADS8661 IC through HAL_SPI_Receive() as shown in the code (per loop it is taking 13us), but when plotting and calculated the sampling rate, I am only able to read one sample at around 25us (I arrived at this conclusion because I turn ON the signal to be monitored after 20ms, so i take that as the reference)

running SPI_clock at 20Mhz. 

SPI init for reference

I'm not sure where I go wrong. is there a way to optiimise it further to get 1msps?

for(int i=0;i<3000;i++)
	{

		//__HAL_TIM_SET_COUNTER(&htim4,0);
		while(!(GPIOI->IDR &(1<<5))); //monitoring RVS Pin
	 	GPIOI->ODR &= ~(1<<0); // CS pin Low

		HAL_SPI_Receive(&hspi2, data_rcv ,2,1); // reading 2 bytes at a time

		GPIOI->ODR |= 1<<0;  //CS pin high
			  temp[temp_cnt]=((data_rcv[0]<<8)|data_rcv[1])>>4;
			  temp_cnt=temp_cnt+1;
		//  counterCount=TIM4->CNT;
	}

  • Hi ,

    Definitely the ADS8661 supports sampling rate up to 1.25Msps. Are you sapling an analog step signal? is your conversion code from the ADC correct corresponding to your analog input signal?  Can you please provide your schematic to review and timing plot for /CS,SCLK, SDO and SDI captured with oscilloscope to check?

    Thanks&regards,

    Dale

  •   

    Hello Dale, 

          Are you sapling an analog step signal? - yes
          is your conversion code from the ADC correct corresponding to your analog input signal?  - yes, used the formula (ADC_val-2048)*(6/1000) since we are using the default ±3 × VREF. 

          Can you please provide your schematic to review and timing plot for /CS,SCLK, SDO and SDI captured with oscilloscope to check?

              - I have requested for the same, will share it once approved. 

    But, Meanwhile is there anything else we could try and optimise through the code (since we are already measuring 13-14 us per loop). I mean, like toggling the CS pin at around 300ns through timer and read multiple values at a time through HAL_SPI_Receive(). [will this help?].

    Thanks and Regards,

    Vibeesh.

  • Hi Vibeesh.,

    ADS8661 integrates a LPF filter which has 15kHz bandwidth, this LPF requires 88us settling time for 12bit 1/2LSB accuracy. To sample your step signal, you need an ADC with a wide bandwidth filter or without a filter (low voltage precision ADC). Do you only need a single channel 12 bit ADC? What's your maximum input signal?

    Best regards,

    Dale