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.

ADS1299: ABOUT VREFP OF ADS1299, WHEN CONFIGURE TO BIPOLAR SUPPLIES,VREFP IS NOT PULL UP TO 2V

Part Number: ADS1299

Hello everyone, I am debugging a board with communication between STM32F767 and ADS1299. Now I meet some problem. My ADS1299 is using internal reference and configure as bipolar supplies. I initial the system as the datasheet says. I write the 0xE0 to CONFIGURE3 and delay for almost 1s. But the VREFP is still -2.5v and the voltage conversion is 0x00. The register can be wrote and read correctly. I don't know why. Can someone help me, thank you.

  • Hello Ming,

    Can you send me your schematic? Also, what is the voltage between VCAP1 and AVSS?

    Brian
  • Thank you for replying me. Now the problem of Vrefp is resolved and the Vcap1 is above 1.1v. But the output data of ADS1299 is still 0x00h is continuous mode, while the registers can be read correctly. But in single shot mode, the output is not stable and the data is unreliable. I use the STM32F7 series ARM and the code is below. Would you please help me?

    int main(void)
    {

    uint8_t address,data,i;
    volatile uint32_t raw_DATA_32[8]={0,0,0,0,0,0,0,0};
    volatile uint32_t temp_32;
    uint8_t ADS1299_DATA_RAW1[27];
    double ADS1299_VOLTAGE[8];

    HAL_Init();

    /* Configure the system clock */
    SystemClock_Config();

    /* Initialize all configured peripherals */
    MX_GPIO_Init();
    MX_SPI2_Init();


    //POWER UP
    HAL_GPIO_WritePin(GPIOC,GPIO_PIN_6,GPIO_PIN_SET);
    HAL_Delay(2);
    HAL_GPIO_WritePin(GPIOC,GPIO_PIN_6,GPIO_PIN_RESET);
    HAL_Delay(2);
    HAL_GPIO_WritePin(GPIOC,GPIO_PIN_6,GPIO_PIN_SET);

    HAL_Delay(1000);

    //RESET
    HAL_GPIO_WritePin(GPIOD,GPIO_PIN_15,GPIO_PIN_SET);
    HAL_Delay(2);
    HAL_GPIO_WritePin(GPIOD,GPIO_PIN_15,GPIO_PIN_RESET);
    HAL_Delay(2);
    HAL_GPIO_WritePin(GPIOD,GPIO_PIN_15,GPIO_PIN_SET);

    HAL_Delay(1000);

    //cs1 low
    HAL_GPIO_WritePin(GPIOD,GPIO_PIN_13,GPIO_PIN_RESET);

    //SDATAC
    data = 0x11;
    HAL_SPI_Transmit(&hspi2,&data,1,1000);

    //CS2 LOW
    HAL_GPIO_WritePin(GPIOD,GPIO_PIN_9,GPIO_PIN_RESET);

    //SDATAC
    data = SDATAC;
    HAL_SPI_Transmit(&hspi2,&data,1,1000);

    //WRITE 0xE0 TO CONFIG3
    address = 0x43;
    HAL_SPI_Transmit(&hspi2,&address,1,1000);

    data = 0x00;
    HAL_SPI_Transmit(&hspi2,&data,1,1000);

    data = 0xE0;
    HAL_SPI_Transmit(&hspi2,&data,1,1000);

    HAL_Delay(1000);


    address =0x40;
    HAL_SPI_Transmit(&hspi2,&address,1,1000);

    data=0x17;
    HAL_SPI_Transmit(&hspi2,&data,1,50);

    HAL_SPI_Transmit(&hspi2,ADS1299Reg_Conituous_Setting,0x18,1000);

    HAL_Delay(1000);

    address = 0x20;
    HAL_SPI_Transmit(&hspi2,&address,1,1000);

    data = 0x17;
    HAL_SPI_Transmit(&hspi2,&data,1,1000);
    HAL_SPI_Receive(&hspi2,ADS1299_REG_2,24,1000); //READ THE REGISTERS DATA TO CHECK

    HAL_GPIO_WritePin(GPIOD,GPIO_PIN_14,GPIO_PIN_RESET); //START PIN SET LOW
    HAL_Delay(10);
    HAL_GPIO_WritePin(GPIOD,GPIO_PIN_14,GPIO_PIN_SET); //START PIN SET HIGH

    data = RDATAC;
    HAL_SPI_Transmit(&hspi2,&data,1,1000);

    //CS2 HIGH
    HAL_GPIO_WritePin(GPIOD,GPIO_PIN_9,GPIO_PIN_SET);

    while(1)
    {

    }

    }

    The code below is the function of interruption. when the /DRDY pin is pull lower, the function works to read the data from ADS1299.

    void EXTI9_5_IRQHandler(void)
    {
    /* USER CODE BEGIN EXTI9_5_IRQn0 */
    //uint8_t address,data,i;
    //uint8_t reg[0x18];

    HAL_GPIO_WritePin(GPIOD,GPIO_PIN_9,GPIO_PIN_RESET);

    HAL_SPI_Receive(&hspi2,ADS1299_DATA_RAW,27,50);

    address = 0x20; //READ THE REGISTER DATA TO CHECK
    HAL_SPI_Transmit(&hspi2,&address,1,50);
    data = 0x17;
    HAL_SPI_Transmit(&hspi2,&data,1,50);

    HAL_SPI_Receive(&hspi2,ADS1299_REG_2,0x18,50);

    HAL_GPIO_WritePin(GPIOD,GPIO_PIN_9,GPIO_PIN_SET);

    /* USER CODE END EXTI9_5_IRQn 0 */
    HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_8);
    /* USER CODE BEGIN EXTI9_5_IRQn 1 */

    }

  • Hello Ming,

    Could you capture the SPI signals during data capture with an oscilloscope or logic analyzer and post them here?

    Regards,
    Brian
  • Sure. the photo of oscilloscope is below:  The first picture is SCLK and CS signal,the upper is CS wave and the lower is SCLK signal. The second is SCLK and MISO signal,the upper is MISO and the lower is SCLK. The third and fourth picture are SCLK and DRDY signal,the upper wave is DRDY and the lower wave is SCLK. Thank you.

  • Please look at the third picture, the first 27 data is reading the voltage and there are all 0x00, and the next data is reading the register of ADS1299 and it is correct.
  • This picture is SCLK and DRDY in a longer time. the data conversion rate is 250hz which shows in the oscillator. It is stranger that the DRDY signal is pulled down in the middle of the period.

  • Hello Ming,

    The data transfer sequence looks to be correct. Would you mind posting a list of the register settings you read back? I want to make sure everything is enabled properly.

    That DRDY and SCLK relationship you show seems correct. DRDY will transition from high to low at the data rate. This will happen independent from any communication from the master, but will follow the data rate settings in the registers. DRDY will come back high on the first falling edge of SCLK.

    Brian
  • Hi,Pisani. Thank you for replying me. The registers value I read back is list below.

    Because I use the internal reference voltage, so I configure the register CONFIG3 to 0xe0, I operate the ads1299 in continuous mode, so the register CONFIG4 is set to  0x00. The configure of the registers is right? Hope to get your help.

  • BTW,I can read data in RDATA(single shot) mode, but it is not stable. I think maybe TI can provide some sample code to show us the correct operating.
  • Hello Ming,

    Have you sent the RDATAC command before you try to retrieve the data without the RDATA command? The RDATAC command will enable the conversion to be loaded into the output shift register automatically. This could explain why you are able to read data with the RDATA command, but not otherwise.

    When you say the data is not "stable", what do you mean? Can you share some of the data you've collected?

    Brian
  • Hello Pisani,

    I programmed the code follow your manual show as below.

    Afer configure the registers for RDATAC mode, I set the START pin high and write the RDATAC command to the ADS1299, then the programme is in the endless loop. Code is blow.

    address =0x40;                                                    //write the continuous mode to the register
    HAL_SPI_Transmit(&hspi2,&address,1,1000);

    data=0x17;
    HAL_SPI_Transmit(&hspi2,&data,1,50);

    HAL_SPI_Transmit(&hspi2,ADS1299Reg_Continuous_Setting,0x18,1000);

    HAL_Delay(10);

    address = 0x20;       
    HAL_SPI_Transmit(&hspi2,&address,1,1000);

    data = 0x17;
    HAL_SPI_Transmit(&hspi2,&data,1,1000);
    HAL_SPI_Receive(&hspi2,ADS1299_REG,24,1000);

    HAL_GPIO_WritePin(GPIOD,GPIO_PIN_14,GPIO_PIN_RESET); //START PIN SET LOW
    HAL_Delay(10);
    HAL_GPIO_WritePin(GPIOD,GPIO_PIN_14,GPIO_PIN_SET); //START PIN SET HIGH
    data = START;
    HAL_SPI_Transmit(&hspi2,&data,1,50);
    HAL_GPIO_WritePin(GPIOD,GPIO_PIN_13,GPIO_PIN_SET); //CS SET HIGH

    HAL_GPIO_WritePin(GPIOD,GPIO_PIN_13,GPIO_PIN_RESET); //CS SET LOW

    data = RDATAC;                                                                             //send RDATAC command.
    HAL_SPI_Transmit(&hspi2,&data,1,50);
    //HAL_Delay(10);
    HAL_GPIO_WritePin(GPIOD,GPIO_PIN_13,GPIO_PIN_SET); //CS SET HIGH

    while(1)

    {
    }

    when the conversion is done and the data is ready to retrieve, the PD12 pin is pull low and run into the EXT interrupt programme which is showed below.

    void EXTI15_10_IRQHandler(void)
    {
    /* USER CODE BEGIN EXTI15_10_IRQn 0 */

    uint8_t address,data;
    HAL_GPIO_WritePin(GPIOD,GPIO_PIN_13,GPIO_PIN_RESET);           //CS set low
    HAL_SPI_Receive(&hspi2,ADS1299_DATA_RAW,27,100);                    //Read 27 bytes from ads1299

    address = 0x20;                                                                                        //Read register to check
    HAL_SPI_Transmit(&hspi2,&address,1,50);

    data = 0x17;
    HAL_SPI_Transmit(&hspi2,&data,1,50);

    HAL_SPI_Receive(&hspi2,ADS1299_REG,24,50);
    HAL_GPIO_WritePin(GPIOD,GPIO_PIN_13,GPIO_PIN_SET);

    /* USER CODE END EXTI15_10_IRQn 0 */
    HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_12);
    /* USER CODE BEGIN EXTI15_10_IRQn 1 */



    /* USER CODE END EXTI15_10_IRQn 1 */
    }

    that is the code, thank you.

  • Hello Ming,

    In the picture you sent a few days ago, there was one where you read the register data immediately after attempting to collect data. Did you also send the SDATAC command before you read that register? You will not be able to read the registers without having previously sent the SDATAC command. If you did not send the SDATAC command, but were still able to read the register, it may indicate that you were never in RDATAC mode at all.

    Brian
  • Hello Pisani,
    I really read the register data immediately after attempting retrieve data from AD,but I never sent SDATAC command to the AD. The only operation that I sent SDATAC command to the AD is just after power up and before the initialization of the AD. You mean that the register can be read only in SDATAC mode? I do sent the RDATAC command to the AD and the /DRDY pin is pull down at the right sample rate. How could it happened? And how can I enter RDATAC mode? I sent the RDATAC command to AD after pulling up the START pin or sending the START command, isn't it correct?
  •   Hi Pisani,

    I do a test after reading your reply and you are right. When I send the RDATAC to the ADS, I can't read the registers. The register can read after I sent the SDATAC command. So what is the matter. I sent the RDATAC command and the /DRDY pin toggle but can't read the voltage data, while I can read the registers.

    I am almost crazy for that. 

  • Hello Ming,

    Thank you for your patience as we work to try and determine the source of the issue.

    So we've determined that the RDATAC command does prevent reading registers. So in your image that you posted previously where you collected data and then immediately read the register, this means that the device was in SDATAC mode. We can conclude this because if the device was in RDATAC mode, you would not have been able to read the register.

    In that case, we can agree that for that particular test, the reason you could not read data was due to the fact the device was in SDATAC mode. This is because when the device is configured in SDATAC mode, the data does not load automatically into the output shift register. Have you tried to send RDATAC and then collect data?

    Brian
  • Hello, Brian
    Thank you for your patience to follow my question. I change my develop library in the weekend and solve the problem, Thank you very much.