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.

msp430f5509 communicate with the ADS1298

Other Parts Discussed in Thread: ADS1298, MSP430F5509

   hello,I wrote some code for the new project,the one msp5509 communicate with ads 1298 via spi,I initial the spi model on the 5509,and cs set low,reset set high and delay 1s,

and set low then delay 1s,after that I set high,I set start from low to high.

first of all,I send sdatac to stop the continous model,

  I tried to send the loop data to the 1298 through the spi,the signal is right,but when I send the read reg command to the 1298,there is no response from it,

   I tried to send the write reg command to initial 1298 first,then I send the rdatac command to try to get the continous data from it ,but also have nothing output.

I don't  know why I did the same thing as the ads1298 spec on the 78 page,but I can not receive any data from the 1298,no matter which model or which command I send to it.

please help me ,thanks,My sclk is about 1.048M and the ads clk is 2M,so i think is not need to delay when send the multiple byte command.

  • Hi Luo Chao,

    Welcome to our forum!  Did you send the STOP command to the ADS1298 first?  That needs to be sent before you can use RREG.  The MSP430F5509 has to be configured with CPOL=0 and CPHA=0 (see Figure 11, page 62 of the MSP430 data sheet) to meet the serial timing depicted in Figure 1 of the ADS1298 data sheet.  Please note, some processors use different naming conventions, the MSP430 uses CKPH which is inverse of the CPHA setting depicted in the ADS1298 data sheet.  If you can send along a screen shot of your SPI interface, we'd be happy to verify it is correctly set up for you.

  • 6253.code from luo.rar6874.code from luo.rarThanks for your help!

    The CPHA and CPOL , CKPH, CPHA part,I wrote like this UCA1CTL0 |= UCMST+UCMSB+UCSYNC+UCCKPL;  is that right?

    and the problem is also exist ,so I attached my code.The question in my code,

    UCA1IE = UCRXIE;                         // Enable USCI_A1 RX interrupt

    that means I open the rx interrupt and closed the tx one,isn't it ?

    but when I send the stop and any other command,the break point in the interrupt always be triggered,now I watch the UCA1IFG always == 0x02, you know the UCTXIFG == 0x02,but the UCRXIFG == 0x01,that means the UCTXIE is enable,and the RCTXIFG is not be triggered.

    I use the the ads 1298 part on the EVM board,the dsp part is not used,so I think the hardware is have no problem .

  •  I am not sure that the reason of receive nothing is interrupt function or the spi configuration or any conditions .

  •  The latest post  sequence part code

    while((UCA1IFG&UCTXIFG)==0);             //send the sdatac command
          UCA1TXBUF = 0x11;
      __delay_cycles(1000000);
     
      while((UCA1IFG&UCTXIFG)==0);             //send the stop command
          UCA1TXBUF = 0x0A;
      __delay_cycles(1000000);
     
      while((UCA1IFG&UCTXIFG)==0);              //read the reg from the 1th reg and the number is c+1;
          UCA1TXBUF = 0x20;
      while((UCA1IFG&UCTXIFG)==0);
          UCA1TXBUF = 0x0c;

    but the issue is still exist.

  • Hi Luo Chao,

    Exclude the '+UCCKPL' part of the setup in the UCA1CTL0 register; that forces the SCLK to dwell high in its inactive state.  Since you are trying to run the EVM-PDK without the DSP board, how do you have the START, RESET, CLKSEL and /CS inputs configured on the EVM?

  • Hi,Tom,

    I connected the START,RESET,CS with the msp5509 gpio,

    cs set low,

    reset set high and delay 1s,and set low then delay 1s,after that I set high,

    I set start from low to high.you can  take a look at my comment in my source code,

    I run the code and try to read 12 regs,but only return uciv ==2 ,rxflg ==0 and therxbuf ==0 in the interrupt function,no body can help me but you,please take a look at it.

  • The code of mine is attached,thanks5353.code.rar