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.

SPI in non callback mode (blocking mode)

Hi,

Does the TI-RTOS SPI driver  in blocking  mode use DMA as well ? If yes,  does the driver basically poll the interrupt  flag ?

is there any way not to use DMA on SPI ?

By the way, what the user guide mean by "Callback mode is supported in the execution of contec of Tasks, Swis & Hwis" ?

thank you

  • siauhwa ong said:
    Does the TI-RTOS SPI driver  in blocking  mode use DMA as well ? If yes,  does the driver basically poll the interrupt  flag ?

    All the SPI drivers in TI-RTOS use the DMA. A task that calls SPI_transfer will pend on a semaphore. An interrupt generated by the DMA controller posts the semaphore to unblock the task that called SPI_transfer().

    siauhwa ong said:
    is there any way not to use DMA on SPI ?

    Not with these TI-RTOS SPI drivers.

    siauhwa ong said:
    By the way, what the user guide mean by "Callback mode is supported in the execution of contec of Tasks, Swis & Hwis" ?

    When you using the SPI driver in SPI_MODE_CALLBACK, SPI_transfer() does NOT pend (wait) on a semaphore after it started (but may not have finished yet..) the SPI transaction. As a result, SPI_transfer() can also be called from the context of a Swi or Hwi. Instead of blocking on a Semaphore in blocking mode, you will get a call to your callback function that you must to provide to SPI_Params as part of the SPI_open() call (when using SPI_MODE_CALLBACK). This callback serves as means to notify you that your SPI_transfer() completed.