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.

CC3200MODLAUNCHXL: SPI transfer on falling edge

Part Number: CC3200MODLAUNCHXL
Other Parts Discussed in Thread: CC3200SDK, CC3200

Hello -

Currently my SPI master sends data on the rising edge.  How can I change it so that it send on the falling edge.

Thanks

  • Dear Daniel - 

    if you have a look in spi.c file (inside the SDK driverlib ==>C:\ti\CC3200SDK_1.3.0\cc3200-sdk\driverlib), you can find the submodes called out (0 through 3)

    those relate to the polarity and phase of the clock, as you desire to change. 

    You probably want to use SPI mode 1 or 2

    in the main.c file of the SPI demo for the CC3200 C:\ti\CC3200SDK_1.3.0\cc3200-sdk\example\spi_demo, there are two spots for the SPI Configuration where you can change this

    one for the master ==>

    // Configure SPI interface -

    //
    MAP_SPIConfigSetExpClk(GSPI_BASE,MAP_PRCMPeripheralClockGet(PRCM_GSPI),
    SPI_IF_BIT_RATE,SPI_MODE_MASTER,SPI_SUB_MODE_0,
    (SPI_SW_CTRL_CS |
    SPI_4PIN_MODE |
    SPI_TURBO_OFF |
    SPI_CS_ACTIVEHIGH |
    SPI_WL_8));

    //

    one for the slave ==> 

    // Configure SPI interface
    //
    MAP_SPIConfigSetExpClk(GSPI_BASE,MAP_PRCMPeripheralClockGet(PRCM_GSPI),
    SPI_IF_BIT_RATE,SPI_MODE_SLAVE,SPI_SUB_MODE_0,
    (SPI_HW_CTRL_CS |
    SPI_4PIN_MODE |
    SPI_TURBO_OFF |
    SPI_CS_ACTIVEHIGH |
    SPI_WL_8));

    //

    You can check out the diagram in the CC3200 Technical Reference Manual on page 248  and decide which one will work for you.