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.

CCS/ADS1247: Problem with SPI communication

Part Number: ADS1247
Other Parts Discussed in Thread: MSP430F5438, , MSP-EXP430F5529LP

Tool/software: Code Composer Studio

Hello,

I'm using ADS1247 with a msp430f5438 microcontroller, and i'm having issues with the spi communication. I've connected START and RESET pins to gpio and I put them at high level at the beginning of my code, while CS pin is tied low.
Then I try to read/write registers of the ADS1247 and i'm not having any answer from the MISO. The device is correctly powered, I can see DDRY pin going high at the default rate of 5 sps. But even if I try to change the data rate in SYS0 register, the data rate keeps at 5 sps.

Am i doing something wrong ? Why can't i have an answer on SPI communication ?


Here are shots of the logical analyser where we can see the DRDY pulses and then a shot where i'm trying to change the data rate and nothing changes.


  • Vivien,


    Can you resend the pictures from the logic analyzer? They didn't make it into the post. Use the picture icon in the writer to insert a picture as a file.

    Noting that the /DRDY pin is giving a 5SPS data rate is a good indication that the device is working so that you should be able to communicate with it.

    Without seeing the device communications from the logic analyzer. There are only two quick things that I can think of to check in your communications. First, confirm that the SCLK, DIN, and DOUT lines are all making it to the device. Just make sure there isn't a bad layout or connection. Second, verify the version of SPI that you are using. The SCLK dwells low, and data is latched at the falling edge of SCLK. If a different version of SPI is used, you won't be able to communicate with the device.

    I'll wait for your logic analyzer pictures. Generally looking at the communications is the fastest way to debug these types of communications errors.

    In the meantime, there is some example firmware that you can find for this device. I don't know if you need it or will find it helpful but it is available. If you go into the ADS1247 product folder and look for Tools and Software, you can find ADS1x4x Firmware Example Code that was written for the MSP-EXP430F5529LP. Here is the link:

    www.ti.com/.../sbac144


    Joseph Wu
  • Thank you for your quick reply Joseph.

    Quite strange that pictures have not been joined to my previous post, but here they are :


    Concerning your advices, I've already checked at the oscilloscope that the signal is making it at every pin of the ADS1247, and SPI seems correctly configured in mode 1. I will now try to change the SPI i'm currently using on the microcontroller.

    Once again, thank you for your attention.

  • Vivien,


    Thank you for the logic analyzer plot. I was able to read through it. I just have a few comments.

    It looks like the SPI is set up correctly. It's not too fast, and it looks like the SPI is the correct version. Here's the sequence that you send:

    10h Not sure what this is?
    23h RREG starting at 03h
    00h one byte
    FFh register value
    43h WREG starting at 03h
    00h one byte
    07h writing 07 to the register

    I don't understand the first byte, but that shouldn't matter to the communication. Looking at the logic analyzer plot, there's no response from the device to the communication. However, you do see the /DRDY pulse every 200ms.

    At this point, I think SCLK is not reaching the device. If SCLK were connected, then /DRDY would go high at the falling edge of the first SCLK as a response by the device similar to a data read. If /DRDY had responded correctly, and there was no response, then I'd say this was a problem with DOUT.

    Check the connection to SCLK again to make sure the connection is correct. Also, check your ground connection between master and the ADS1247. If these are correct, is it possible the device is damaged?


    Joseph Wu
  • Joseph,

    After another check of the connections, I saw that the DIN pin of the ADS1247 was twisted. So I've straightened the pin back, and now the device is correctly responding.

    A lot of thanks for your help and attention.