1. This forum section is a read-only archive which contains old newsgroup posts. If you wish to post a query, please do so in one of our main forum sections (here). This way you will get a faster, better response from the members on Motherboard Point.

SPI - can a slave initiate a transfer?

Discussion in 'Embedded' started by Ron Blancarte, Sep 11, 2006.

  1. I am programming for a device where there are two Analog Devices
    ADuC831 chips. One operates the communication for the device and the
    other does data acquisition. The Comm chip is the slave to the
    acquisit ion chip. This interface is something like this:

    COMM (S) MAIN (M)
    SClock <- SClock
    MOSI <-> MOSI
    MISO <-> MISO
    ~SS <- P3.4 (as a digital output)
    --- ~SS (not connected in a useful way to the Comm chip)

    (BTW - this is fixed, I am only programming it, I can't change this)

    So my question is this - can Comm, acting ONLY as a slave, initiate a
    transfer to Main?

    The only other solution I have is that Main polls Comm to ask if it
    needs to do a transfer.

    Ron Blancarte, Sep 11, 2006
    1. Advertisements

  2. Ron Blancarte

    Tim Wescott Guest

    As you have constrained it, no.

    If you could arrange for another wire between the comm and main to flag
    the main chip when the comm had data waiting then yes.

    If you can't then you're constrained to poll.


    Tim Wescott
    Wescott Design Services

    Posting from Google? See http://cfaj.freeshell.org/google/

    "Applied Control Theory for Embedded Systems" came out in April.
    See details at http://www.wescottdesign.com/actfes/actfes.html
    Tim Wescott, Sep 11, 2006
    1. Advertisements

  3. Thanks for the input.

    Actually, I should RTFM, because it turns out that my boss who
    designed this thing already planned out for this issue. He hooked up
    one of the pin outs to the external interrupt of the main chip. When
    I trigger that, THAT tells the system to start doing transfers from
    the comm chip.

    So in my description I left something out.

    Ron Blancarte, Sep 12, 2006
  4. No. ( not unless you get clever with the SS line, and OR wire it, and
    pulse it briefly LOW from the slave, to say 'hey' and then the
    INT to master starts a slave transaction )

    Yes. Normally you just include a null-packet as a slave present check,
    with no data.

    Jim Granville, Sep 12, 2006
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.