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.

ADS1293: ADS1293 DRDYB Interrupt signals stop

Part Number: ADS1293

Hi,

I'm using the ADS1293 EVM board, however with an external Teensy 3.6 and not the on board Microcontroller (as the ADS1293 is only one part of another, larger project). Using the register config for a 3 channel ECG and attached ECG simulator I can get nice output data (stream reading the data loop register), until all of a sudden the DRDYB signals stop coming. I've confirmed this with an oscilloscope, screenshots attached (I hope they uploaded correctly). I'm not doing anything in the code that should stop the device and I'm pretty sure it was working in an earlier test. I can still see very small spikes on the DRDYB pin in the same frequency as the Interrupt signals were coming in earlier. The durations for which I do get the interrupt singnals are random. I have confirmed that nothing is wrong with the evaluation board in general (using the ADS1293EVM test software).

I can not see anything relevant in the error registers once the data stops coming (or before for that matter, as I'm also interrupting on the Alarm pin):

ERROR_LOD: 0x00
ERROR_STATUS: 0x00
ERROR_RANGE1: 0x00
ERROR_RANGE2: 0x00
ERROR_RANGE3: 0x00
ERROR_SYNC: 0x00
ERROR_MISC: 0x00

If anyone has an idea that could help? For now, I'll read out all other registers to see if anything is amiss there...

Thank you!

ADS1293_DataRdyProblem02.pdf

ADS1293_DataRdyProblem01.pdf

  • Register settings:

    address value
    0x00 0x00
    0x01 0x11
    0x02 0x19
    0x03 0x00
    0x04 0x00
    0x05 0x00
    0x06 0x00
    0x07 0x0f
    0x08 0xff
    0x09 0x00
    0x0a 0x07
    0x0b 0x00
    0x0c 0x04
    0x0d 0x00
    0x0e 0x00
    0x0f 0x00
    0x10 0x00
    0x11 0x00
    0x12 0x04
    0x13 0x00
    0x14 0x00
    0x15 0x00
    0x16 0x00
    0x17 0x05
    0x18 0x00
    0x19 0x00
    0x1a 0x01
    0x1b 0x00
    0x1c 0x17
    0x1d 0x00
    0x21 0x02
    0x22 0x02
    0x23 0x02
    0x24 0x02
    0x25 0x00
    0x26 0x00
    0x27 0x08
    0x28 0x00
    0x29 0x00
    0x2a 0x00
    0x2b 0x00
    0x2c 0x00
    0x2d 0x00
    0x2e 0x33
    0x2f 0x30
    0x30 0x00
    0x31 0x00
    0x32 0x00
    0x33 0x00
    0x34 0x00
    0x35 0x00
    0x36 0x00
    0x37 0x00
    0x38 0x00
    0x39 0x00
    0x3a 0x00
    0x3b 0x00
    0x3c 0x00
    0x3d 0x00
    0x3e 0x00
    0x3f 0x00
    0x40 0x01
    0x50 0x00
    0x60 0x00
    0x62 0x00
  • Hi Johnny,

    Thanks for your post and welcome to the forum! 

    Do you have a 10k pullup resistor from your Teensy to the DRDYB and/or your ALARMB line? 

    This thread may be relevant: https://e2e.ti.com/support/data-converters/f/73/t/272146

  • Thank you for the answer.

    I was initially relying on the 1M pullup resisor on the EVM board, and did temporarily enable the internal pullups of the teensy and even added some external pullups. I will give 10k resistors another try tomorrow though.

  • Additional pullup resistors do not help I've tested this again and I had tested this before (it was, at least in my opinion unlikely to be the problem - the ADS1293EVM does have an onboard pullup).  I've also flashed the MSP430 with other firmware to ensure it in not interfering somehow (just an idea) - I used the blink example code from the MSP430 Firmware Upgrade Example.

    I've read through the data sheet again and can not find anything else that could cause this - as I understand it the only way to stop the conversion should be the writing the START_CON bit in the CONFIG register to 0. It is not 0 when the issue occurs.

    Another thing I've checked again were the registers related to the interrupt (MASK_DRDYB and DRDYB_SRC):

    DRDYB_SRC:  0 0   1 0 0 0

    MASK_DRDYB: 0 0

    (SYNCB_SRC: 0 0)

    Which should be correct.

    If someone has another idea as to why the ADS1293 would simply stop conversion/ stop sending out the interrupts, I'd be happy to hear it. I'm also adding the relevant bits of code here:

    void ADS1293_3LeadECG() {
        uint8_t count, i = 0;
        uint8_t read_buf[CH_DATA_SIZE];
        uint32_t adc_data_ch1, adc_data_ch2;
        uint32_t count2 = 0;

        ADS1293_Reset();

        attachInterrupt(digitalPinToInterrupt(ADS1293_DataRdyPin), ADS1293_IntHandler, FALLING);
        attachInterrupt(digitalPinToInterrupt(ADS1293_AlarmPin), ADS1293_AlarmHandler, FALLING);

        ADS1293_WriteRegSettings3LeadECG();   // Set up ADS1293 for Channel Scan

        count = CH_DATA_SIZE;                                                        // bytes to read: ADC_DOUT2 - ADCDOUT0
        ADS1293_SPIWriteReg(ADS1293_CONFIG_REG, ADS1293_START);
        while (1) {
            if (ADS1293_DataRdy == 1) {
                ADS1293_SPIStreamReadReg(read_buf, count);                            // read adc output into read_buf

                // format raw adc output data
                adc_data_ch1 = ((uint32_t)read_buf[0] << 16) | ((uint16_t)read_buf[1] << 8) | read_buf[2];
                adc_data_ch2 = ((uint32_t)read_buf[3] << 16) | ((uint16_t)read_buf[4] << 8) | read_buf[5];

                Serial.printf("%d\t %d\t\n", adc_data_ch1, adc_data_ch2);

                if (++i == SAMPLE_ARRAY_SIZE)    i = 0;        // sample array is full

                ADS1293_DataRdy = 0;                                                // clear flag
            }
            if (ADS1293_Alarm == 1) {
                Serial.println("ADS1293: An error has occured:");


                Serial.printf("ERROR_LOD: %d\n", convertDecimalToBinary(ADS1293_SPIReadReg(ADS1293_ERROR_LOD_REG)));
                Serial.printf("ERROR_STATUS: %d\n", convertDecimalToBinary(ADS1293_SPIReadReg(ADS1293_ERROR_STATUS_REG)));
                Serial.printf("ERROR_RANGE1: %d\n", convertDecimalToBinary(ADS1293_SPIReadReg(ADS1293_ERROR_RANGE1_REG)));
                Serial.printf("ERROR_RANGE2: %d\n", convertDecimalToBinary(ADS1293_SPIReadReg(ADS1293_ERROR_RANGE2_REG)));
                Serial.printf("ERROR_RANGE3: %d\n", convertDecimalToBinary(ADS1293_SPIReadReg(ADS1293_ERROR_RANGE3_REG)));
                Serial.printf("ERROR_SYNC: %d\n", convertDecimalToBinary(ADS1293_SPIReadReg(ADS1293_ERROR_SYNC_REG)));
                Serial.printf("ERROR_MISC: %d\n", convertDecimalToBinary(ADS1293_SPIReadReg(ADS1293_ERROR_MISC_REG)));

                // clear ADS1293_Alarm flag
                ADS1293_Alarm = 0;
            }
        }
    }

    void ADS1293_SPIStreamReadReg(uint8_t* buffer, uint8_t count) {
      ADS1293_CsSet();
      SPI.transfer(ADS1293_READ_BIT + ADS1293_DATA_LOOP_REG); //Set address to initial register

      for (uint8_t i = 0; i < count; i++) {
        buffer[i] = SPI.transfer(0x00);
      }
      ADS1293_CsReset();
    }

    Interrupt is set on falling edge, ISR simply sets the interrupt flag to 1.

    Registers configured as follows:

    address value
    0x00 0x00
    0x01 0x11
    0x02 0x19
    0x03 0x00
    0x04 0x00
    0x05 0x00
    0x06 0x00
    0x07 0x0f
    0x08 0xff
    0x09 0x00
    0x0a 0x07
    0x0b 0x00
    0x0c 0x04
    0x0d 0x00
    0x0e 0x00
    0x0f 0x00
    0x10 0x00
    0x11 0x00
    0x12 0x04
    0x13 0x00
    0x14 0x00
    0x15 0x00
    0x16 0x00
    0x17 0x05
    0x18 0x00
    0x19 0x00
    0x1a 0x01
    0x1b 0x00
    0x1c 0x17
    0x1d 0x00
    0x21 0x02
    0x22 0x02
    0x23 0x02
    0x24 0x02
    0x25 0x00
    0x26 0x00
    0x27 0x08
    0x28 0x00
    0x29 0x00
    0x2a 0x00
    0x2b 0x00
    0x2c 0x00
    0x2d 0x00
    0x2e 0x33
    0x2f 0x30
    0x30 0x00
    0x31 0x00
    0x32 0x00
    0x33 0x00
    0x34 0x00
    0x35 0x00
    0x36 0x00
    0x37 0x00
    0x38 0x00
    0x39 0x00
    0x3a 0x00
    0x3b 0x00
    0x3c 0x00
    0x3d 0x00
    0x3e 0x00
    0x3f 0x00
    0x40 0x01
    0x50 0x00
    0x60 0x00
    0x62 0x00

  • Hi Johnny,

    Sorry for the delay, I was traveling on business. 

    Unfortunately I cannot offer more support as it's most likely an issue with the Teensy interface - which is not a TI device.