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.

ADS7953: ADS7953SBR

Part Number: ADS7953

Hello TI forum,

We are using STM32H753 to communicate with the ADC7953 and aren't sure about the correct SDI sequence.
I have tried to search in this forum, but didn't find an exact match but tried to implement the following sequence:

0x4200 - Initially reset all registers
0x4000 - Set GPIO mode (all inputs)
0x1X10 - Operate in manual mode, set the next channel to sample (the X in the number), and map GPIO 0-3 to DO12-15
0x0000 - No change. sent by using SPI_TransmitReceive to read data in SDO
0x0000 - No change. sent by using SPI_TransmitReceive to read data in SDO

We need to read a different channel / IO in each iteration (full sequence above).

Every time the result is 0, even when toggling a GPIO connected from the STM to the ADS.
Also, in that matter - when we want to read a GPIO, what address should be sent in DI10-07?

Thanks,
Raz.

  • Some updates:

    I have added 0x0000 frane after 0x4200, 0x4000
    I have changed the last two 0x0000 to be the same as the last 0x1X10 (send again the same frame of manual mode, address, etc.)
    I have increased the SPI frequency to ~1.1MHz
    I have added a delay (10ms) after each SPI_Transmit function and before setting /CS back to "1"
    I have changed the manual mode frame (the so-called 0x1X10 frame) to send also DI11=1 (enable bits programming) and DI3..0=1111 so GPIO Input data won't be ignored

    ..Still doesn't work at all.

    What am I missing?

  • Hello Raz!

    Welcome to our e2e forum!  Can you send over logic analyzer or O'Scope screen captures showing you SDI, SDC, CS and SCLK details?  Your programming steps look fine.  You programmed bits DO15-DO12 (set DIO4 to 1) to be GPIO status rather than CHID, you don't need to read any specific address, they should all show the GPIO status.

  • Hey Tom,

    Thanks for replying. Unfortunately, It's a bit problematic for me to examine the SPI wave forms on the board I'm working on, and yes I know it's not good.

    I'll see what I can do about that.

  • Great!  Let us know when you can share some waveforms.

  • Sorry for the delayed response.

    So, we had an issue with the component generating the Vref factor for the ADC conversion and now it is fixed.

    I still can't produce waveforms for the SPI, as I don't have good access to the hardware, will try to figure it out.
    In the meanwhile, I would like to assure that I'm doing everything right.

    Which is the correct/best sequence?

    1.
    fr 1: 0x4200 - reset registers
    fr 2: 0x4000 - set GPIO mode, all INPUTs
    fr 3: 0x1X10 - manual mode, enable programming bits DI6-0, Vref, normal operation, GPIO3-0 mapped to DO15-12
    fr 4: 0x0000
    fr 5: 0x0000

    maybe frame 3 should be 0x1X11, instead of 0x1X10 ??

    2.
    0x4200
    0x4000
    0x1X10
    0x0000 + (bitwise or) address
    0x0000 + (bitwise or) address

    3.
    0x4200
    0x4000
    0x1X10
    0x1X10
    0x1X10

    4.
    0x4200
    0x0000

    0x4000
    0x0000

    0x1X10
    0x0000 (or maybe 0x1X10, or maybe just channel address?)
    0x0000 (or maybe 0x1X10, or maybe just channel address?)

    Also, should I use HAL_SPI_TransmitReceive for the two last frames (to read SDO)?

    Should I add HAL_Delay before raising CS back to 1 (to fit a requested time window demand)?

    Nothing is working Disappointed

  • Hi Raz,

    Having access to the hardware and seeing the waveforms will be key to getting this resolved.  Let's just focus on ADC conversions for the moment.  You say you are always reading 0x0000 - is that correct?  You are not getting any conversion results using manual mode?  A bad reference to the ADC could be the reason for that.  Writing 0x4200 initially is fine, but you should not need to do that.  There is a 2-cycle latency, but if you were to write 0x1000, 0x1080, 0x1100, 0x1180...you should see something in the lower 12 bits that represent you conversion results.

  • Hi,

    I'm not writing 0x1000 at any point.

    I am trying to toggle GPIO IO1 by pushing "1" from outside (using an STM32 GPIO output) and read it using the GPIO mapping to DO15-12, but I get nothing.

    Here is a waveform record when I'm trying to send 0x4200

    Y: CS, B: CLK, P: MOSI

    It looks like no matter what I am trying to transmit, it looks like that.

    SPI configurations:
    8 Bits (16 bits and 4 bits look the same)
    CPOL Low
    Phase 1 Edge
    Speed: ~0.5MHz (also tried 1Mhz, 150KHz)
    MSB first

  • Ok, an update:

    So it appears that the customer made a design mistake (their design, not ours) where another MISO on the same SPI bus made a convention with the ADS MISO so it was ignored.

    I have disconnected the other MISO and now receiving data from the ADS and can have progress.

    Will keep you posted.

  • Hey Tom,

    I'm glad to let you know that I have managed to get the device working.
    The problem was a bad Vref input (a DC-DC power supplier didn't work).

    Now I think I found a bug, or I don't know what:
    I realized that I need to work with Range 2 (2xVref) which works fine getting the correct results after reverse converting the raw data of the ADC.
    The problem that I found is that some of the iterations return wrong address - I'm requesting to read CHx and received results from CHy.
    I'm reading each channel in a separate session (using Auto1/2 to read them all sequencally isn't relevant for our application and customer requests.

    Any idea why could the addresses gets messed like that?
    In Range 1 (1xVref) it works fine (but the range is to low)

    Of course I'm using the same commands sequence for both configurations, only changing bit 6 for range.

  • Hi Raz,

    Happy to hear that you are making progress!  There should be no difference in the addressing when going between RANGE1 and 2.  Can you get a screen shot of the SPI control lines?

  • I have eventually ended up moving to Auto1 mode instead of Manual mode, sending one channel address at a time, and it is working just fine. 

    Not sure why the manual mode didn't work, but setisfied with the results.

    Thank you for your support! (: