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.

Is it possible to use SPI by mixing SSI-Pins (EK-TM4C123G)

Is it possible to use SPI with SSI-Pins from multiple SSI modules?

for example:

SCK: PD0 (SSI3)

CS: PA3 (SSI0)

MOSI: PD3 (SSI3)

MISO: PB6 (SSI2)

i know that i have to disconnect R9 to use PB6 and PD0 together...

if this is possible, how can i configure this PINs? 

thanks for any help. 

  • Hello Patrick,

    No, it is not possible to use SSI with pins borrowed from different SSI modules and expect it to work from a single SSI controller. The other option would be to bit band the pins to emulate the protocol.

    Regards
    Amit
  • thanks for this very fast answer. what means bit band the pins, and how is it possible to emulate the protocol? i can't use other pins because any other ssi-pins are already in use for other devices...
  • Hello Patrick,

    Could you check the following example from TivaWare. It has GPIO's from a single port but I think it can be modified to meet your requirements

    D:\ti\TivaWare_C_Series-2.1.1.71\examples\peripherals\ssi\soft_spi_master.c

    Regards
    Amit
  • Hi Amit,
    thanks for this example, i'm going to study it, but it seems to be complicated for me (sorry i'm a noob with evaluationboards). Maybe i have to find another solution.
    best regards
    patrick
  • Hello Patrick

    It is not too difficult. Basically what the example shows is how GPIO toggle by writing to the GPIO Data Register and reading the same can be used to form a SPI protocol without having to use the SSI controller.

    Regards
    Amit
  • Patrick Ehinger said:
    Is it possible to use SPI with SSI-Pins from multiple SSI modules?

    Believe your question is (close) to that which we asked - 4-5 years past.    And - alas - we agree w/Amit - you cannot "mix" SSI capable pins from different SSI modules.    That said - what we did (and you can too) is choose the SSI module which has the greatest number of (potential) SSI pins.  

    In our case - our SSI pins were distributed across 3 different, LX4F, MCU Ports - and worked very well.   And again - while widely distributed "Port-wise" these all were w/in the same SSI module.  (i.e. we did not "mix" SSIn w/pins other than SSIn!)

    Often - by employing Excel (or similar) you can directly "paste in" (from the MCU manual) the "Alternate functions" available for all MCU pins.   Then you may more easily survey - then choose - the best means to harvest the peripheral functions you require...

    We've found it best to start with our specific project's most mandatory peripheral requirements - "lock those in" - and then proceed to "fill in" the others.   There do exist several "vendor tools" to assist this process - yet we find the flexibility, color-coding, & vast functional capability w/in Excel far superior in the satisfaction of our, "MCU Pin & Functional Needs."

  • Hello Amit,
    is it possible to do this while using the pfatfs-library? i'm going to connect a sd-card with spi... and this seems to be very comlicated to me...
    regards
    patrick
  • hello cb1,
    sorry but i don't understand what you are trying to tell me. do you think it is possible to use this pins or not?
    regards patrick
  • Might you read again - more slowly? If still unclear (then) I'll detail further...
  • I'm not clear on your setup Patrick.

    Keep in mind that one SSI port can service multiple external ICs. Either through multiple chip selects or by chaining or both.

    Robert
  • what i understand is that u try to tell me that i have to choose some other pins... like PF3 or PD1 instead of PA3 and PF0 or PD2 instead of PB6 (in this case alle pins would be SSI3 or SSI1)? but i am not sure if u try to tell me another solution...
  • Robert's answer deserves, "Beyond Green!" (damn Robert - not again...)

    Any single SSI Port you may harvest may be "distributed" among "many" Slave SSI chips. You may select "any" free GPIO to serve as the "FSS or Chip Select" for each different slave device...
  • Your understanding is correct. So long as all pins are from the same "number" SSI (such as all from SSI0 or all from SSI1 or SSI2 - you may select them from different MCU ports.)

    That said - Robert's recognition that if you can only harvest ONE SSIx Port - that usually will be sufficient. You employ different FSS pins - which may come from "anywhere" (i.e. they do not have to be SSI related!) to serve as "manual" FSS or Slave chip selects...
  • I could mention the use of a 3 to 8 decoder for extra credit :)

    Probably not needed by the poster.

    Robert
  • Now - you've gone too far Robert!   (and "do" pay attention to those pesky (potentially tri-state) voltage levels...)

  • Maybe I should just work in trinary

    Robert
  • Or - you could interpret the spec (uniquely) "your way..."    What's become of our poster?