Because of the Thanksgiving holiday in the U.S., TI E2E design support forum responses may be delayed the week of Nov. 21. Thank you for your patience.

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.

ADS1198ECGFE-PDK: Test Signal not coming

Part Number: ADS1198ECGFE-PDK
Other Parts Discussed in Thread: ADS1198,
Hi, I am working on the ADS1198 ECG with the ESP32 microcontroller. I am successfully able to read and write on ADS1198 registers. But, I am not able to get a test signal after configuring the registers of ADS1198 as mentioned in the data sheet. My configuration setting is:
void ads1198_test_signal_IDC(ADS1198_SPI_HANDLE_t* ads1198_Handle, ADS1198_INFO_t* ads1198_info)
    ads1198_sendCommand(ads1198_Handle, ADS1198_CMD_SDATAC);
    vTaskDelay(5 / portTICK_PERIOD_MS);
    ads1198_write_register(ads1198_Handle, ADS1198_ADD_CONFIG1    , 0x06); 
    ads1198_write_register(ads1198_Handle, ADS1198_ADD_CONFIG2    , 0x30);
    ads1198_write_register(ads1198_Handle, ADS1198_ADD_CONFIG3    , 0x80);
    ads1198_write_register(ads1198_Handle, ADS1198_ADD_LOFF       , 0x03);
    ads1198_write_register(ads1198_Handle, ADS1198_ADD_CH1SET     , 0x05);
    ads1198_write_register(ads1198_Handle, ADS1198_ADD_CH2SET     , 0x05);
    ads1198_write_register(ads1198_Handle, ADS1198_ADD_CH3SET     , 0x05);
    ads1198_write_register(ads1198_Handle, ADS1198_ADD_CH4SET     , 0x05);
    ads1198_write_register(ads1198_Handle, ADS1198_ADD_CH5SET     , 0x05);
    ads1198_write_register(ads1198_Handle, ADS1198_ADD_CH6SET     , 0x05);
    ads1198_write_register(ads1198_Handle, ADS1198_ADD_CH7SET     , 0x05);
    ads1198_write_register(ads1198_Handle, ADS1198_ADD_CH8SET     , 0x05);
    ads1198_write_register(ads1198_Handle, ADS1198_ADD_RLD_SENSP  , 0x00);
    ads1198_write_register(ads1198_Handle, ADS1198_ADD_RLD_SENSN  , 0x00);
    ads1198_write_register(ads1198_Handle, ADS1198_ADD_LOFF_SENSP , 0xFF);
    ads1198_write_register(ads1198_Handle, ADS1198_ADD_LOFF_SENSN , 0x02);
    ads1198_write_register(ads1198_Handle, ADS1198_ADD_LOFF_FLIP  , 0x00);
    ads1198_write_register(ads1198_Handle, ADS1198_ADD_LOFF_STATP , 0x00);
    ads1198_write_register(ads1198_Handle, ADS1198_ADD_LOFF_STATN , 0x00);
    ads1198_write_register(ads1198_Handle, ADS1198_ADD_GPIO       , 0x00);
    ads1198_write_register(ads1198_Handle, ADS1198_ADD_PACE       , 0x00);
    ads1198_write_register(ads1198_Handle, ADS1198_ADD_RESERVED   , 0x00);
    ads1198_write_register(ads1198_Handle, ADS1198_ADD_CONFIG4    , 0x00);
    ads1198_write_register(ads1198_Handle, ADS1198_ADD_WCT1       , 0x0A);
    ads1198_write_register(ads1198_Handle, ADS1198_ADD_WCT2       , 0xE3);

    ads1198_read_registers(ads1198_Handle, ADS1198_ADD_ID, ADS1198_REG_SIZE, ads1198_info->ads1198_registers_default_values);
    for(int i = 0; i < ADS1198_REG_SIZE ; i++){
        printf("Reg[%d]: %x\n", i, ads1198_info->ads1198_registers_default_values[i]);
    ads1198_sendCommand(ads1198_Handle, ADS1198_CMD_START);
    vTaskDelay(5 / portTICK_PERIOD_MS);
    ads1198_sendCommand(ads1198_Handle, ADS1198_CMD_RDATAC);
    vTaskDelay(10 / portTICK_PERIOD_MS);
Basically, i make my program using FreeRTOS...... I attach Negative Edge interrupt to DataReady pin so i can fetch data from ADS1198. I also make ISR_Handler for that that give semaphore to the data processing task. But, i am not able to get Square wave as mentioned in datasheet.
/* ISR for Negative Edge Interrupt of the DataReady Pin  */
static void IRAM_ATTR dataReady_isr_handler(void* args)
    BaseType_t task_woken = pdFALSE;
    if(xSemaphoreGiveFromISR(ads1198_spiReceive_Sem, &task_woken))
/* ADS1198 GPIO init */
void ads1198_gpio_init(ADS1198_GPIO_t* ads1198_gpio)
    esp_err_t err;
    // CS pin as an OUTPUT
    err = gpio_set_direction(ads1198_gpio->cs, GPIO_MODE_OUTPUT);
    assert(err == ESP_OK);
    // initially CS pin is on HIGH state
    gpio_set_level(ads1198_gpio->cs, 1);

    // RESET pin as an OUTPUT
    err = gpio_set_direction(ads1198_gpio->reset, GPIO_MODE_OUTPUT);
    assert(err == ESP_OK);

    // DRDY pin as an INPUT with interrupt
    gpio_config_t io_conf_dataReady;
    io_conf_dataReady.intr_type = GPIO_INTR_NEGEDGE;
    io_conf_dataReady.pin_bit_mask = (1 << ads1198_gpio->dataReady);
    io_conf_dataReady.mode = GPIO_MODE_INPUT;
    io_conf_dataReady.pull_up_en = GPIO_PULLUP_ENABLE;
    io_conf_dataReady.pull_down_en = GPIO_PULLDOWN_DISABLE;
    err = gpio_config(&io_conf_dataReady);
    assert(err == ESP_OK);
    // Install the driver’s GPIO ISR handler service, which allows per-pin GPIO interrupt handlers.
    //  install ISR service with default configuration
    // attach the interrupt service routine
    gpio_isr_handler_add(ads1198_gpio->dataReady, dataReady_isr_handler, NULL);

    ads1198_spiReceive_Sem = xSemaphoreCreateBinary();
void ads1198_spi_receive_task(void* args)
    /* infinite loop */
    while (1)
        // printf("Hello\n");
        if(xSemaphoreTake(ads1198_spiReceive_Sem, portMAX_DELAY))
            ads1198_readChannelsData(&ads1198_Handle);   // this function read the data via spi and print all 8 channels data in csv format like:      ch1_data, cha2_data, ch3_data, ch4_data, ch5_data, ch6_data, ch7_data, ch8_data       and i am plotting this channels on arduino serial monitor    
  • Hi,

    May I ask how do you verify you can "I am successfully able to read and write on ADS1198 registers."?

    Are you able to read the device ID? i.e. ID: ID Control Register (Factory-Programmed, Read-Only) Address = 00h

    Then, please refer and double check the following register in datasheet page 42-

    CONFIG2: Configuration Register 2 Address = 02h

    Which Channel are you trying to set to read the test signal?

    Suggest to stay with 1 channel first and refer to datasheet page 45 -

    CHnSET: Individual Channel Settings (n = 1:8) Address = 05h to 0Ch

    CHnSET[2:0] = 101 and try different gain settings.

    Do you have/use the ADS1198 evaluation kit/board(EVM)? Have you tried this with the EVM and note down the correct registers settings?


  • Hi,  ,

    Yes ,I am able to read the device ID and all the 26 registers value  and also able to write in the registers except the read only registers. But, when I configured the registers according to page number 66 in the datasheet of ADS1198.... I did not get any square wave (or Test Signal).

    I get Device ID : 0xB6

    and, the setting that I have done for internal Test Signal (Square wave) is:

     CONFIG1             =    0x06 
     CONFIG2             =    0x30
     CONFIG3             =    0x80
     LOFF                    =    0x03
     CH1SET               =    0x05
     CH2SET               =    0x05
     CH3SET               =    0x05
     CH4SET               =    0x05
     CH5SET               =    0x05
     CH6SET               =    0x05
     CH7SET               =    0x05
     CH8SET               =    0x05
     RLD_SENSP        =    0x00
     RLD_SENSN        =    0x00
     LOFF_SENSP      =    0xFF
     LOFF_SENSN     =    0x02
     LOFF_FLIP          =    0x00
     LOFF_STATP       = 0x00
     LOFF_STATN      =    0x00
     GPIO                    =   0x00
     PACE                   =    0x00
     RESERVED         =    0x00
     CONFIG4             =   0x00
     WCT1                  =    0x0A
     WCT2                  =    0xE3
    |                                                                                                                                               |
    |   Note:  I am using ESP32 WROOM board as a mother board instead of MMB0 board.     |
  • Hi,

    " Note:  I am using ESP32 WROOM board as a mother board instead of MMB0 board. "

    Yes, understood. So, before your connect the EVM board to your MCU board, Have you tried the test signals with the EVM and note down the correct registers settings?

    Which channel do you not observe the test signal? 1 channel or all channels?

    Did you try different gain settings as mentioned earlier?

    How are the Channel(s) input pins connected externally? Please make sure there are no short to GND or inter/intra connect to each other?

    What is your voltage reference? Do you use internal or external reference voltage? And, VREFP – VREFN?

    What is the clock or oscillator source you use for the ADS1198 main CLK? Do you use internal or external clock(oscillator)? Can you try toggle between 0 and 1 for Bit 2 of CONFIG2(Address 02h)? Also, try different frequencies for Bits[1:0].

    When you say Test Signal not coming? How and What was the method you see or visualize?

    If all above not help to see the test signals, I may need your help to probe SPI signals lines in next steps.


  • 1. As per my observation, the test signal does not come on all channels. 

    2. No, I did not try different gain settings. I just tried the value of GAIN = 6. 

    3. All channels are isolated from one another. 

    4. I set up the ADS1198ECGFE-PDK board in unipolar mode with a 3.3 volt external voltage. (VREFP = 2.4 volts according to Bit 5 of the CONFIG 3 register setting) 

    5. I used the internal clock. 

    6. The method I use to plot a graph is the Arduino Serial Monitor. Basically, I'm just serializing all of the 8-channel data after converting it to 16-bits in CSV format. 

    7. Now, I am going to try to work on your suggestions. I will tell you the latest report on that.

  • Thanks.

    Will be waiting.

  • Hi,
    Since I did not hear back from you, I believe my suggestions answered your questions.
    I will close this post and if you have any pending questions, feel free to post them here or open a new thread.
    Thanks and have a great day!

  • Thanks for your help. Now, Test signal coming without noise and also able to get ECG data from ECG-simulator. But now whenever I am trying to increase sample-rate by changing CONFIG1 register value to "0x04", I am not getting proper signal, and I don't know why.

    ADS1198 Settings for Channel reading:

    CONFIG1              =    0x06 
     CONFIG2             =    0x30
     CONFIG3             =    0xDC
     LOFF                    =    0x03
     CH1SET               =    0x00
     CH2SET               =    0x00
     CH3SET               =    0x00
     CH4SET               =    0x00
     CH5SET               =    0x00
     CH6SET               =    0x00
     CH7SET               =    0x00
     CH8SET               =    0x00
     RLD_SENSP        =    0x00
     RLD_SENSN        =    0x00
     LOFF_SENSP      =    0xFF
     LOFF_SENSN     =     0x02
     LOFF_FLIP          =     0x00
     LOFF_STATP       =    0x00
     LOFF_STATN      =     0x00
     GPIO                    =    0x00
     PACE                   =     0x00
     RESERVED         =    0x00
     CONFIG4             =    0x00
     WCT1                  =     0x0A
     WCT2                  =     0xE3
  • Hi,

    could you show the difference of the results between setting CONFIG1 Bits[2:0] to

    110 fMOD/1024 125SPS

    100 (default) fMOD/256 500SPS


    Is your fCLK = 2.048MHz?

    Do you use your own MCU? Does your MCU program also adapt the data rate change?

    Could you try the internal test signal again or inject some known signals/voltage?


  • I configured fCLK = 2.048 MHz and using own MCU ESP32. I am sharing the result of internal test signal with you. So, you can understand the problem that I am getting. In the below picture Sample rate = 500 SPS:

    Note: CONFIG1 = 0x04 and other setting are the same that I shared earlier.

    Result: At 500 SPS (with internal test signal)

    Result: At 125 SPS (with internal test signal) (CONFIG1 = 0x06 and other setting are the same that I shared earlier.)

  • Hi,

    Thanks for the pictures.

    Have you tried different data rate? or does this only occur when the data rate is set to 100 (default) fMOD/256 500SPS?

    Does your MCU program e.g. timing and/or data array and/or memory allocating also adapt the data rate change?

    I suggest to probe the SPI signals lines and do side by side comparison between the two different data rates to see whether there are any glitches or jittering occurs along the SPI signals lines.

    And please make sure the SPI signals match the timing constraints in the datasheet.


  • Hi,
    Since I did not hear back from you, I believe my suggestions answered your questions.
    I will close this post and if you have any pending questions, feel free to post them here or open a new thread.
    Thanks and have a great day!