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.

ADS1294 test signal configuration

Other Parts Discussed in Thread: ADS1294

Hi,

I am using ADS1294 with STM32 master.
I have followed the initialization sequence in figure 77 from the data sheet, but I am still not able to receive the test signal correctly.
The SPI communication works well - I am able to read and write to the register without problems.

Here is my register configuration:
CONFIG1 = 0x86
CONFIG2 = 0x10
CONFIG3 = 0xC0
CH1SET = 0x5
CH2SET = 0x5
CH3SET = 0x5
CH4SET = 0x5

and my configuration code:

void ads_init(void) {
uint8_t ads_reg[30];
memset(&ads_reg[0], 0xAB, sizeof(ads_reg));//dummy Value

//init GPIOs, SPI and interrupts
ads_low_level_init();
nDRDY_init();

//init the double buffer
doubleBuff.active_buff = doubleBuff.adc_buff_A;
doubleBuff.not_active_buff = doubleBuff.adc_buff_B;
doubleBuff.counter = 0;
doubleBuff.buff_voll = false;
memset(doubleBuff.adc_buff_A, 0, sizeof(doubleBuff.adc_buff_A));
memset(doubleBuff.adc_buff_B, 0, sizeof(doubleBuff.adc_buff_B));

//activate ads1294
ADS_nPWDN_HIGH;
ADS_nRESET_HIGH;
delay_ms(2);

//perform reset
ADS_nRESET_LOW;
delay_ms(2);

ADS_nRESET_HIGH;


// Device Wakes Up in RDATAC Mode, so Send SDATAC Command so Registers can be Written
ads_send_command(ADS_SDATAC);

// use internal reference
ads_reg[0] = 0b11000000;
ads_write_to_register(CONFIG3, 1, &ads_reg[0]);

//set to high resolution mode f_DRDY=500Hz
ads_reg[0] = 0b10000110; //CONFIG1 500SPS
//set to high resolution mode f_DRDY=8kHz
//ads_reg[0] = 0b10000010; //CONFIG1 8kSPS
ads_write_to_register(CONFIG1, 1, &ads_reg[0]);
ads_reg[0] = 0;
ads_write_to_register(CONFIG2, 1, &ads_reg[0]);

//set all channel to input short
ads_reg[0] = 0x1;
ads_reg[1] = 0x1;
ads_reg[2] = 0x1;
ads_reg[3] = 0x1;
ads_write_to_register(CH1SET, 4, &ads_reg[0]);

ADS_START_HIGH; //after this line nDRDY starts toggle with f=500KHz
ads_send_command(ADS_RDATAC);

while (doubleBuff.buff_voll == true) {
//TODO calc offset
doubleBuff.buff_voll = false;
}

ads_send_command(ADS_SDATAC);

ads_reg[0] = 0x10;
ads_write_to_register(CONFIG2, 1, &ads_reg[0]);

//set all channel to test signal
ads_reg[0] = 0x05;
ads_reg[1] = 0x05;
ads_reg[2] = 0x05;
ads_reg[3] = 0x05;
ads_write_to_register(CH1SET, 4, &ads_reg[0]);


//this two lines of code are used only for debug purposes in order to ensure that the registers are written correctly
memset(&ads_reg[0], 0xAB, sizeof(ads_reg));//some dummy value
ads_read_from_register(CONFIG1, 8,&ads_reg[0]);


//put device into RDATAC mode
ads_send_command(ADS_RDATAC);


}

Best regards,
Stefan

  • Hi Stefan,

    Thanks for your question.

    I do not see any obvious problems in the code and register settings. Does the RREG line at the end of your code confirm that the written register values were retained by the ADS1294?

    Also, did you put a delay after the SDATAC command? Please ensure that you are waiting at least 4*tCLK cycles after issuing SDATAC so that the subsequent commands are recognized properly.

    Best Regards,