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.

TI-RTOS SDSPI on Tiva SSI1

Other Parts Discussed in Thread: TM4C1294NCPDT, CC3200

While attempting to configure the SDSPI driver to use SSI1 on a Tiva Tm4C1294NCPDT, I ran into a couple of problems.

The driver assumes that the SCK, MOSI, and MISO signals are all on the same port. On the part in question, the clock is on PB5 while MOSI and MISO are on port E. How does one initialize the HWAttrs structure correctly to handle this situation? Looking at the driver code, the structure appears to only be used to initialize the direction of the I/O pins. Can I do this manually before or after calling SDSPI_init() to accomplish the same result?

I'm unclear on purpose of the portTx/PinTx fields. The code shows them being used to send the initial clock train, but only to set the pin high. When it comes time to restore the pin to its peripheral functionality, it resorts back to using portSPI/pinMOSI. What is even more confusing is the example in EK_TM4C1294XL.c. In that file for SSI2, PortSPI/pinMOSI are set to PD1, but portTx/pinTx are set to PB1. But the example works as is. Any guidance would be appreciated.

  • Hi Scott,

    We noticed this issue and as of latest release (TI-RTOS 2.10.01) the HWAttrs were changed so the port for each SPI pin (CLK, MOSI, MISO) is specified in the structure (allowing you to use pins on different ports).  

    The initial clock train is used to set the SD card to SPI mode.  To do so, the CS and the MOSI pin must be kept high while the SCLK should be pulsed. The TX pin is set high to ensure there are no logic level transitions while clocking.

    Useful link: http://elm-chan.org/docs/mmc/mmc_e.html 

    Regards,

    -- Emmanuel

  • Hello,

    I cant found sdspicc26xx driver file.

    #include <ti/drivers/SDSPI.h>

    Currently the following SDSPI peripheral implementations are supported:
    SDSPITiva.h
    SDSPICC3200.h
    SDSPIUSCIA.h
    SDSPIUSCIB.h
    SDSPIEUSCIA.h
    SDSPIEUSCIB.h

    How can I give support (SDSPI driver) for cc26xx How can do basic C I/O file operation or FatFS I/O operation by calling fopen(), fread(), fwrite(), calls from my API.

    Regards,
    Rajneesh
  • Hi Rajneesh,

    Unfortunately, we do not have the SDSPI driver support on CC26XX. You may have to write a SDSPI driver for CC26XX yourself. The SDSPI driver port for other boards (Tiva, CC3200 ...) can be used as a reference for your development.

    Also, this thread is old and closed. Please open a new thread for further queries.

    Vikram