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.

MSP432/ADS1292R: Problems with ADS1292R interaction

Part Number: ADS1292R
Other Parts Discussed in Thread: ADS1292

Tool/software: Code Composer Studio

Hello friends,
I need some help to create a interface between the MSP432 and ADS1292R. I have speend a lot of time trying to connect
this chip, with this microcontroler and I can t get successefull proccess . I have decide, and I have done a small code to try
interact with chip, but sommething has wrong.
Soo, my friends does anyone with a lot o knowledge have a chip from the MSP430 familly, if someone have had any interface with these devices, I appreciate your help or ability to share.

Attached I send the code I made, hoping that someone will help me analyze and can help correct.
Thanks in advance

0638.main.c
#include <msp.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <stdint.h>
#include <string.h>

#include "main.h"
#include "ads1292.h"


/* Statics */

volatile uint32_t SPI_RX_COUNT  = 0;
volatile uint32_t SPI_RX_BUFF[8]={};
volatile bool Read_1292 = false;
signed long secgtemp=0;
unsigned long uecgtemp = 0;
volatile uint32_t DataPacketHeader[16];
volatile signed long s32DaqVals[8];
volatile uint32_t data_len = 8;
volatile bool ads1292dataReceived = false;


int main(void){
    int i, j;
    watchdoghold();

    ads1292_Init();


    __enable_irq();

    NVIC->ISER[0] = 1 << ((EUSCIB0_IRQn) & 31);
    NVIC->ISER[1] = 1 << ((PORT2_IRQn) & 31);

    while(1){
          /*VERIFY PIN SATATE*/
          if((P2->IN & ADS1292_DRDY) == false){
              Read_1292 = true;

          }

          if (ads1292dataReceived == true){


             for(i=0;i<6;i+=3){                  // data outputs is (24 status bits + 24 bits Respiration data +  24 bits ECG data)

                 uecgtemp = (unsigned long) (  ((unsigned long)SPI_RX_BUFF[i+3] << 16) |
                            ((unsigned long) SPI_RX_BUFF[i+4] << 8) |
                             (unsigned long) SPI_RX_BUFF[i+5]);


                 uecgtemp = (unsigned long) (uecgtemp << 8);

                 secgtemp = (signed long) (uecgtemp);
                 secgtemp = (signed long) (secgtemp >> 8);

                 s32DaqVals[j++]=secgtemp;
             }

                   DataPacketHeader[0]  = CES_CMDIF_PKT_START_1 ;   // Packet header1 :0x0A
                   DataPacketHeader[1]  = CES_CMDIF_PKT_START_2;    // Packet header2 :0xFA
                   DataPacketHeader[2]  = (uint8_t) (data_len);     // data length
                   DataPacketHeader[3]  = (uint8_t) (data_len>>8);
                   DataPacketHeader[4]  = CES_CMDIF_TYPE_DATA;      // packet type: 0x02 -data 0x01 -commmand

                   DataPacketHeader[5]  = s32DaqVals[1];            // 4 bytes ECG data
                   DataPacketHeader[6]  = s32DaqVals[1]>>8;
                   DataPacketHeader[7]  = s32DaqVals[1]>>16;
                   DataPacketHeader[8]  = s32DaqVals[1]>>24;

                   DataPacketHeader[9]  = s32DaqVals[0];            // 4 bytes Respiration data
                   DataPacketHeader[10] = s32DaqVals[0]>>8;
                   DataPacketHeader[11] = s32DaqVals[0]>>16;
                   DataPacketHeader[12] = s32DaqVals[0]>>24;

                   DataPacketHeader[13] = CES_CMDIF_TYPE_DATA;   // Packet footer1:0x00
                   DataPacketHeader[14] = CES_CMDIF_PKT_STOP ;   // Packet footer2:0x0B

                   for(i=0; i<15; i++){
                       printf("\rDATA.:%d, %d\n",i, DataPacketHeader[i]);     // transmit the data over USB
                   }

                   ads1292dataReceived = false;
                   SPI_RX_COUNT = 0;
          }
    }
}


void watchdoghold(void){

    WDTCTL = WDTPW + WDTHOLD;                                       /*STOP WATCHDOG TIMER*/

}

2086.main.h
3343.ads1292.c
#include <msp.h>
/* Standard Includes */
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <stdbool.h>



#include "ads1292.h"

volatile uint32_t RX_DATA = 0;
volatile uint16_t SPI_TX_BUF[10];
extern volatile uint32_t SPI_RX_COUNT;
extern volatile uint32_t SPI_RX_BUFF[8]={};
extern volatile bool ads1292dataReceived;
extern volatile bool Read_1292;

void ads1292_Init(void){


    /*DEFINE GPIO PINS DIRECTION*/
    gpioPinsDirection();
    /*INITIALIZE THE DATA READY*/
    initAds1292rDrdy();
    /*CLOCK CONFIGURATION*/
    clockSystem();
    /*SPI PINS CONFIGURATION*/
    ads1292rSpiBusConf();
    /*SPI DEVICE FREQUENCY CONFIGURATION*/
    ads1292rSPI();

    /*ADS1292R RESET*/
    ads1292rReset();
    /*ADS1292R DISABLE START*/
    ads1292rStartDisable();
    /*ADS1292R ENABLE START*/
    ads1292rStartEnable();
    /*ADS1292r HARD STOP*/
    ads1292rHardStop();
    /*START DATA CONVERTION COMMAND*/
    startDataConvertionCommand();
    /*STOP DATA CONVERTION COMMAND*/
    stopDataConvertionCommand();
    /*SMALL DELAY TO SETTLE*/
    delayADS1292R(50);
    /*STOP READ DATA CONTINUOUS*/
    stopContinuousConvertionCommand();
    /*SMALL DELAY TO SETTLE*/
    delayADS1292R(300);

    /*ADS1292R REGISTER WRITE*/
    ads1292rRegisterWrite(ADS1292_REG_CONFIG1, 0b00000010);     /*SET SAMPLING RATE TO 500 SPS*/
    /*SMALL DELAY TO SETTLE*/
    delayADS1292R(10);
    ads1292rRegisterWrite(ADS1292_REG_CONFIG2, 0b10100000);       /*LEAD-OFF COMP OFF, TEST SIGNAL DISABLE*/
    /*SMALL DELAY TO SETTLE*/
    delayADS1292R(10);
    ads1292rRegisterWrite(ADS1292_REG_LOFF, 0b00010000);          /*LEAD-OFF DEFAULTS*/
    /*SMALL DELAY TO SETTLE*/
    delayADS1292R(10);
    ads1292rRegisterWrite(ADS1292_REG_CH1SET, 0b01000000);          /*CH1 ENABLE, GAIN, CONNECTED TO ELECTRODE*/
    /*SMALL DELAY TO SETTLE*/
    delayADS1292R(10);
    ads1292rRegisterWrite(ADS1292_REG_CH2SET, 0b01100000);          /*CH2 ENABLE, GAIN, CONNECTED TO ELECTRODE*/
    /*SMALL DELAY TO SETTLE*/
    delayADS1292R(10);
    ads1292rRegisterWrite(ADS1292_REG_RLDSENS, 0b00101100);         /*RLD SETTINGS:FMOD/16, RLD ENABLE, RLD INPUT FROM CH2 ONLY*/
    /*SMALL DELAY TO SETTLE*/
    delayADS1292R(10);
    ads1292rRegisterWrite(ADS1292_REG_LOFFSENS, 0x00);                /*LOFF SETTINGS: ALL DISABLED*/
    /*SMALL DELAY TO SETTLE*/
    delayADS1292R(10);
    ads1292rRegisterWrite(ADS1292_REG_RESP1, 0b11110010);         /*RESPIRATION: MOD/DEMOD TURNED ONLY, PHASE 0*/
    /*SMALL DELAY TO SETTLE*/
    delayADS1292R(10);
    ads1292rRegisterWrite(ADS1292_REG_RESP2, 0b00000011);         /*RESPIRATION: CALIB OFF, RESPIRATION FREW DEFAULTS*/
    /*SMALL DELAY TO SETTLE*/
    delayADS1292R(10);
    /*START READ DATA CONTINUOUS*/
    startContinuousConvertionCommand();
    /*SMALL DELAY TO SETTLE*/
    delayADS1292R(10);
    /*ADS1292R ENABLE START*/
    ads1292rStartEnable();

}


/*SET GPIO PINS DIRECTION*/
void gpioPinsDirection(void){
    P2->SEL0 |= ADS1292_PWDN  | ADS1292_START  ;
    P2->SEL1 |= ADS1292_PWDN  | ADS1292_START  ;
    /*DEFINE LIKE OUTPUT*/
    P2->DIR  |= ADS1292_PWDN  | ADS1292_START;
    /*SET THIS PORTS LIKE PERIPHERALS*/
    P3->SEL0 |= ADS1292_CS;
    P3->SEL1 |= ADS1292_CS;
    /*DEFINE LIKE OUTPUT*/
    P3->DIR  |= ADS1292_CS;
}

/*CLOCK SYSTEM CONTROL*/
void clockSystem(void){
    CS->KEY  = CS_KEY_VAL;                             /*UNLOCK CS MODULE ACCESS*/
    CS->CTL0 = CS_CTL0_DCORSEL_4;                      /*SELECT DCO = 24MHz*/
    CS->CTL1 = CS_CTL1_DIVS_3 |                        /*SOURCE DIV = f(SMCLK)/8 = 3MHz*/
               CS_CTL1_SELA_2 |                        /*SELECT ACLK  = REFOCLK*/
               CS_CTL1_SELS_3 |                        /*SELECT SMCLK = DCOCLK*/
               CS_CTL1_SELM_3;                         /*SELECT MCLK  = DCOCLK*/
    CS->KEY = 0x00;                                    /*LOCK CS MODULE ACCESS*/
    /*ADJUST CLOCK TO 1MHZ*/
}

/*PORT SPI BUS CONFIGURATION*/
void ads1292rSpiBusConf(void){
    /*SET SPI OPTION SELECT*/
    P1->SEL0 |= ADS1292_MOSI | ADS1292_MISO |
                ADS1292_CLK;                           /*SET 3 PIN SPI PERIPHERAL BITS*/
    /*SET SPI OUT DIRECTION*/
    P1->DIR |=  ADS1292_MOSI | ADS1292_CLK;            /*CLOCK AND DIROUT AS OUTPUT*/
    /*CLEAR SPI OUT DIRECTION*/
    P1->DIR &= ~(ADS1292_MISO);                        /*DIN AS INPUT*/
}

/*SPI DEVICE CONFIGUATION*/
void ads1292rSPI(void){


    EUSCI_B0->CTLW0  = EUSCI_B_CTLW0_SWRST |           /*REMAIN eUSCI STATE MACHINE IN RESET*/
                       EUSCI_B_CTLW0_MST   |           /*SET AS SPI MASTER*/
                       EUSCI_B_CTLW0_SYNC  |           /*SET AS SYNCHRONOUS MODE*/
                       EUSCI_B_CTLW0_CKPH  |           /*SET CLOCK POLARITY H*/
                       EUSCI_B_CTLW0_MSB   ;           /*MSB FIRST*/

    EUSCI_B0->CTLW0 |= EUSCI_B_CTLW0_SSEL__ACLK;       /*ACLK*/
    EUSCI_B0->BRW = 6;                                 /*fBitClock = fBRCLK/UCBRx[~500KHz]*/
    EUSCI_B0->CTLW0 &= ~(EUSCI_B_CTLW0_SWRST);         /*CLEAR SW RESET, RESUME OPERATION*/
    EUSCI_B0->IE |= EUSCI_B_IE_RXIE;                // Enable USCI_B0 RX interrupt


}

/*ADS1292R RESET CONFIGURATION*/
void ads1292rReset(void){
   P3->OUT |= ADS1292_PWDN;                            /*RESET PIN HIGH*/
   delayADS1292R(100);                                 /*WAIT 1 mSec*/
   P3->OUT &= ~(ADS1292_PWDN);                         /*RESET PIN LOW*/
   delayADS1292R(100);                                 /*WAIT 1 mSec*/
   P3->OUT |= ADS1292_PWDN;                            /*RESET PIN HIGH*/
   delayADS1292R(100);                                 /*WAIT 1 mSec*/
}
/*ADS1292r CS ENABLE*/
void ads1292rCsEnable(void){
    P3->OUT |= ADS1292_CS;                              /*SET CS SPI TO LOW*/
}
/*ADS1292r CS DISABLE*/
void ads1292rCsDisable(void){
    /*SMALL DELAY TO SETTLE*/
    delayADS1292R(100);
    P3->OUT &= ~(ADS1292_CS);                                /*SET CS SPI TO HIGH*/
}
/*ADS1292R DISABLE START CONFIGURATION*/
void ads1292rStartDisable(void){
   //unsigned short i;
   P3->OUT &= ~(ADS1292_START);
   /*SMALL DELAY TO SETTLE*/
   delayADS1292R(20);
}
/*ADS1292R ENABLE START CONFIGURATION*/
void ads1292rStartEnable(void){
   //unsigned short i;
   P3->OUT |= ADS1292_START;
   /*SMALL DELAY TO SETTLE*/
   delayADS1292R(20);
}
/*ADS1292r HARD STOP*/
void ads1292rHardStop(void){
//  unsigned short i,j;
    P3->OUT &= ~(ADS1292_START);                            /*SET START PIN TO LOW*/
    /*SMALL DELAY TO SETTLE*/
    delayADS1292R(100);
}
/*#######################################################################################*/

/*START DATA CONVERTION COMMAND*/
void startDataConvertionCommand(void){
    ads1292rSpiCommandData(START_);                /*SET 0x08 TO THE ADS1292R*/
}

/*STOP DATA CONVERTION COMMAND*/
void stopDataConvertionCommand(void){
    ads1292rSpiCommandData(STOP_);                 /*SET 0x0A TO THE ADS1292R*/
}
/*STOP READ DATA CONTINUOUS*/
void stopContinuousConvertionCommand(void){
    ads1292rSpiCommandData(S_DATA_C);               /*SET 0x11 TO THE ADS1292R*/
}

/*START READ DATA CONTINUOUS*/
void startContinuousConvertionCommand(void){
    ads1292rSpiCommandData(R_DATA_C);              /*SET 0x10 TO THE ADS1292R*/
}

/*ADS1292R SPI COMMAND DATA*/
void ads1292rSpiCommandData(uint32_t data){
    /*ADS1292r CS DISABLE*/
    ads1292rCsDisable();
    /*SMALL DELAY TO SETTLE*/
    delayADS1292R(50);
    /*ADS1292r CS ENABLE*/
    ads1292rCsEnable();
    /*SMALL DELAY TO SETTLE*/
    delayADS1292R(50);
    /*ADS1292r CS DISABLE*/
    ads1292rCsDisable();
    while(!(EUSCI_B0->IFG & EUSCI_B_IFG_TXIFG));
    EUSCI_B0->TXBUF = data;
    while(EUSCI_B0->STATW & EUSCI_B_STATW_BBUSY);
    /*ADS1292r CS ENABLE*/
    ads1292rCsEnable();
    /*SMALL DELAY TO SETTLE*/
    delayADS1292R(2);
}

/*ADS1292R REGISTER WRITE*/
void ads1292rRegisterWrite(uint32_t READ_WRITE_ADDRESS, uint32_t data){

    switch(READ_WRITE_ADDRESS){
        case 1:
            data = data & 0x87;
        break;
        case 2:
            data = data & 0xFB;
            data |= 0x80;
        break;
        case 3:
            data = data & 0xFD;
            data |= 0x10;
        break;
        case 7:
            data = data & 0x3F;
        break;
        case 8:
            data = data & 0x5F;
        break;
        case 9:
            data |= 0x02;
        break;
        case 10:
            data = data & 0x87;
            data |= 0x01;
        break;
        case 11:
            data = data & 0x0F;
        break;
        default:
        break;
    }
    SPI_TX_BUF[0] = READ_WRITE_ADDRESS | W_REG;
    SPI_TX_BUF[1] = 0;                                  /*WRITE SINGLE BYTE*/
    SPI_TX_BUF[2] = data;                               /*WRITE SINGLE BYTE*/
    /*ADS1292r CS DISABLE*/
    ads1292rCsDisable();
    /*SMALL DELAY TO SETTLE*/
    delayADS1292R(2);
    /*ADS1292r CS ENABLE*/
    ads1292rCsEnable();
    /*SMALL DELAY TO SETTLE*/
    delayADS1292R(2);
    /*ADS1292r CS DISABLE*/
    ads1292rCsDisable();
    /*SMALL DELAY TO SETTLE*/
    delayADS1292R(2);

    while(!(EUSCI_B0->IFG & EUSCI_B_IFG_TXIFG));      /*POLLING TO SEE IF THE TX BUFFER IS READY?*/
    EUSCI_B0->TXBUF = SPI_TX_BUF[0];                  /*SEND THE FIRST DATA TO THE TX BUFFER*/

    while(!(EUSCI_B0->IFG & EUSCI_B_IFG_TXIFG));      /*POLLING TO SEE IF THE TX BUFFER IS READY?*/
    EUSCI_B0->TXBUF = SPI_TX_BUF[1];                  /*SEND THE FIRST DATA TO THE TX BUFFER*/

    while(!(EUSCI_B0->IFG & EUSCI_B_IFG_TXIFG));      /*POLLING TO SEE IF THE TX BUFFER IS READY?*/
    EUSCI_B0->TXBUF = SPI_TX_BUF[2];                  /*SEND THE FIRST DATA TO THE TX BUFFER*/
    /*SMALL DELAY TO SETTLE*/
    //printf("TXBUFF = 0x%08X\n",EUSCI_B0->TXBUF);
    delayADS1292R(2);
    /*ADS1292r CS ENABLE*/
    ads1292rCsEnable();
    /*SMALL DELAY TO SETTLE*/
    delayADS1292R(2);
}

void initAds1292rDrdy(void){
    /*P2.5 AS IO*/
   // P2->SEL0 &= ~(ADS1292_DRDY);
    /*P2.5 AS INPUT*/
    P2->DIR &= ~(ADS1292_DRDY);
    /**/
    P2->REN |= ADS1292_DRDY;
    /*P2.5 PULL OUT*/
    P2->OUT |= ADS1292_DRDY;
    /*P2.5 HIGH TO INTERRUPT*/
    P2->IES |= ADS1292_DRDY;
    /*P2.5 CLEAR FLAG*/
    P2->IFG &= ~(ADS1292_DRDY);
    /*P2.5 ENABLE INTERRUPT*/
    P2->IE  &= ~(ADS1292_DRDY);
}

void enableAds1292rDrdy(void){
    /*P2.5 CLEAR FLAG*/
    P2->IFG &= ~(ADS1292_DRDY);
    /*P2.5 ENABLE INTERRUPT*/
    P2->IE  |= ADS1292_DRDY;
}

void disableAds1292rDrdy(void){
    /*P2.5 CLEAR FLAG*/
    P2->IFG &= ~(ADS1292_DRDY);
    /*P2.5 CLEAR INTERRUPT*/
    P2->IE  &= ~(ADS1292_DRDY);
}

void delayADS1292R(unsigned msec){
    unsigned  c;
    for(c=0;c<msec;c++);
}

/*PORT x INTERRUPT SERVICE ROUTINE*/
void PORT2_IRQHandler(void){
    if(P2->IFG &= ADS1292_DRDY){
        /*CLEAR INTERRUPT FLAG i.e DATA DRDY INTERRUPT STATUS*/
        P2->IFG &= ~(ADS1292_DRDY);
        /*DUMMY READ*/
        SPI_RX_COUNT = EUSCI_B0->RXBUF;
        SPI_RX_COUNT = 0;
        EUSCI_B0->TXBUF = 0;
        EUSCI_B0->IE |= EUSCI_B_IE_RXIE;
    }
}



/*SPI INTERRUPT SERVICE ROUTINE*/
void EUSCIB0_IRQHandler(void){
     RX_DATA = EUSCI_B0->RXBUF;
     if (Read_1292 == true){
         printf("data: %d\n",RX_DATA);
         /*STORE THE RESULTS IN ARRAY*/
         SPI_RX_BUFF[SPI_RX_COUNT++] = RX_DATA;
         if(SPI_RX_COUNT > 8){
             ads1292dataReceived = true;
             Read_1292 = false;
             EUSCI_B0->IE &= ~(EUSCI_B_IE_RXIE);
         }else{
             EUSCI_B0->TXBUF = 0;
         }
     }

}

2251.ads1292.h

  • Hi,

    I sent it to a concerned engineer. We will get back to you ASAP. Please bear with us.

    Thanks,

    PM

  • Hello Armando,

    Which MCU are you using? Looking at the code it is not clear.

    Thanks,

    Sai

  • Hello Sai, 

     I am using a MSP432P401R, but if I have something similar in the other chip's of the MSP430 could already try to solve, the documentation is not clear, I have now made some modifications, and it bring me some values but they are not consistent as it only gives me 14 values and should read continuously

  • armandoferr said:
    I need some help to create a interface between the MSP432 and ADS1292R.

    Can you explain this in more detail? Which peripheral of the MSP432P4 are you trying to use?

    armandoferr said:
    I have speend a lot of time trying to connect this chip, with this microcontroler and I can t get successefull proccess .

    What is the exact issue that you are facing? Also provide any debug steps you have taken so that we can try to narrow down the issue.

    Thanks,

    Sai

  • Hello Sai Reddy,

    I can understand some of your questions. Peripheral?! I trying interface a ADS1292R component  with SPI communication port.

    I have update the code, I don't know if the integration is well done, now the code don't return error's but I have put a printf in this excerpt of code 

            if (ads1292dataReceived == true){
                j=0;
                for(i=0;i<6;i+=3){                  // data outputs is (24 status bits + 24 bits Respiration data +  24 bits ECG data)
    
    
                    uecgtemp = (unsigned long) (  ((unsigned long)SPI_RX_Buff[i+3] << 16) | ( (unsigned long) SPI_RX_Buff[i+4] << 8) |  (unsigned long) SPI_RX_Buff[i+5]);
                    uecgtemp = (unsigned long) (uecgtemp << 8);
                    secgtemp = (signed long) (uecgtemp);
                    secgtemp = (signed long) (secgtemp >> 8);
    
                    s32DaqVals[j++]=secgtemp;
                }
    
                DataPacketHeader[0] = CES_CMDIF_PKT_START_1 ;   // Packet header1 :0x0A
                DataPacketHeader[1] = CES_CMDIF_PKT_START_2;    // Packet header2 :0xFA
                DataPacketHeader[2] = (uint8_t) (data_len);     // data length
                DataPacketHeader[3] = (uint8_t) (data_len>>8);
                DataPacketHeader[4] = CES_CMDIF_TYPE_DATA;      // packet type: 0x02 -data 0x01 -commmand
    
                DataPacketHeader[5] = s32DaqVals[1];            // 4 bytes ECG data
                DataPacketHeader[6] = s32DaqVals[1]>>8;
                DataPacketHeader[7] = s32DaqVals[1]>>16;
                DataPacketHeader[8] = s32DaqVals[1]>>24;
    
                DataPacketHeader[9] = s32DaqVals[0];            // 4 bytes Respiration data
                DataPacketHeader[10] = s32DaqVals[0]>>8;
                DataPacketHeader[11] = s32DaqVals[0]>>16;
                DataPacketHeader[12] = s32DaqVals[0]>>24;
    
                DataPacketHeader[13] = CES_CMDIF_TYPE_DATA;   // Packet footer1:0x00
                DataPacketHeader[14] = CES_CMDIF_PKT_STOP ;   // Packet footer2:0x0B
    
                for(i=0; i<15; i++){
                    UART_transmitData(EUSCI_A0_BASE, DataPacketHeader[i]);     // transmit the data over USB
                }
                ads1292dataReceived = false;
                SPI_RX_Buff_Count = 0;
            }
        }
    
    //    PCM_gotoLPM0();
    //    __no_operation();
    }

    and I can only get zeros in printf, and it's not continuous, give me an array of 15 values at zero and stop. The biggest problem is that this integrated has lfew examples available, and the datasheet is not easy for beginners. It is in my interest to solve the most urgent connection of this chip, everything you need I can provide. My reason for opening this post on forum was even to appeal to some contributor who has already developed something with this chip and a texas microcontroller, to point me the right way

  • Hello Armando,

    It looks like where ever you are reading the data, it is returning zero.

    I am not familiar with ADS1292R  device and with the information provided so far, I am not sure how I can help with this issue. 

    Some tips I can provide:

    • Ensure that your hardware connection is correct. For this refer the datasheet/RTM of ADS1292R  and the MSP432P4 MCU.
    • Identify the command to send (to ADS1292R from the MSP432P4 MCU) to get "chip id" or test data.
    • Send this command and check for the expected reply.
    • Connect Logic Analyser or Oscilloscope to the SPI lines to monitor if the expected transaction is occurring on the SPI lines.

    Once you perform the above steps you should have some idea of what the issue is.

    Thanks,

    Sai

  • Hello Sai,

    This is  what i got with the digital analyzer.

  • Hi Armando,

    In addition to the advice that Sai has given so far, I had the following thoughts:

    1. Have you tried increasing the delays that you are putting in ads1292.c? I noticed that you have delayADS1292R() calls throughout your code, but the delay durations seem very short to me. The implementation of the delay function results in a ~6 cycle per loop delay, looking at my compiled MSP432 code. When you multiply that by the 48MHz clock speed, you end up with a <1us delay per loop. For most invocations of delayADS1292R(), the resulting delay is less than 1ms delay that this poster mentions using in their thread here: https://e2e.ti.com/support/data-converters/f/73/t/623664. Have you tried setting a much larger delay and seeing if that affected things?
    2. Have you followed the basic data capture setup guide from the ADS1292 guide? If you look at https://www.ti.com/lit/ds/symlink/ads1292r.pdf figure 63, there's a startup sequence you should use to get the device into a known-good mode to verify the SPI interface. Have you tried performing just that setup?

    Regards,

    Michael