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.

Reading samples from ADS1292 - cc2541 interfacing with cascaded ADS1292 & ADS1292R

Other Parts Discussed in Thread: ADS1292R, CC2541, ADS1292, CC2540

I'm unable to read samples over SPI in DRDY interrupt. The code (ISR and function called from ISR is given below)

The hardware has two cascaded ADS1292 & ADS1292R connected over SPI to CC2541 microcontroller

Able to configure and read back ADS1292 registers over SPI. The ADS1292 is setup in continuous sampling (RDATAC command) at initialization.

The problem is reading from SPI as (SPI_Rx_buf = U0DBUF) always as 0. Any inputs?

Ganesh 

  • hey, Ganesh,

               My situation is just the oppsite to yours. I'm using a CC2540 and two ADS1292r, they are connected through SPI. Now I just cannot write or read ADS1292r's registers.

    Each time I read the register, without writing anything to it, the value varies. I think something must be wrong when reading or writing the registers.

        If I donnot configure the registers,the ADS1292r will work well with the default register values. I can read ADC datas through SPI ,and send them though bluetooth to a PC, the values seems all right, which are 60 00 40  00 60 00 ....... we can see the format status is right.

    Can you share me part of your code about how to write or read the registers? I checked my code many times, and I really cannot find where could be the problem.

    If you'd like to take a look at my source code , you can contact me by sending me an email:   zhoubinwy@gmail.com. 

    Thanks,

                   kesly.

  • Kesly

    In my case the problem turned out to be the SPI clock frequency setting. By tweaking the value of the usart divisor setting, I was able to setup the right SPI clock freq which was just right to configure ADS and also read the samples.

    The code to read/write the ADC registers is same as the example provided by TI for their MSP430 based ADS1292 hardware. Check the ADS1x9x_ECG_Recorder_FW reference software code from TI.  For write operation, you may need to add some delay after ensuring byte is transmitted and before clearing the chip enable. I suspect this could be your problem, if you are not doing this.

    Hope this helps Let me know

    Thanks

    Ganesh

  • What are your clock settings on CC2541 and ADS1292r?  

    Have you choosed fCLK=512KHz divided from the clock of cc2540 and SCLK=1MHz ,just the same as the MSP430 demo?

     I used a 2.048MHz oscillator as fCLK for ADS1292 and setted the SPI clock to 4.096MHz, this doesn't work, is there any problem?

    By the way, have you modified the delays in the code? Does it matters?

    Can you share me the part where you configure the SPI clock ,ADC clock and delays?

    Thank you very much!

            kesly.

  • I'm trying to read the ADS1292's ID register with a CC2540 without much success.  Any hints or tricks?

    It always returns zero as its ID, I'm expecting 0x53.  

    More explicitly, I am sending 0x20, 0x01, 0x00, 0x00, and receiving 0x60, 0x00, 0x00, 0x3F in response.  This matches what I am seeing on the oscilloscope.

    I feel as though I've missed some step in the power-up sequence.  Is there example code available that reads from this register?  Alternatively, is there a better "sanity check" path to verify that the ADS1292 is responding correctly?

    _____________________________________________________

    Edit: It turns out that my issue was in not sending the SDATAC command before attempting to peek and poke registers.

  • What do you have source code for The MSP430F5529 in ADS1292 EKG FE Evaluation Board