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 with DMA or without DMA for external SPI chip(ADC/DAC)

Other Parts Discussed in Thread: MSP430F5659, DAC8750, ADS1292, MSP430FR5969

Hello,

I am working with MSP430F5659 controller for interface ADS1292 and DAC8750 IC's. My application has TI RTOS version 2.14.3.28.

Ii did the coding for ADC1292 using standalone driver, without using RTOS API for my POC and its working fine. Now i need to use the actual RTOS SPI API for the handling of ADC and DAC in my  application using tasks, so i want to know whether i need to use DMA based non DMA based application to read the ADC1292 data's.

Even i want to know SPI transmit is looks ok but for SPI receive using API how i can achieve if i don't know the receive byte count? Please share code for both receive and transmit with or without using DMA.

Also let me know when and how to achieve the callback, for TX and RX?

Just for information: My ADC/DAC will be enabled only on command basis and data is captured for the specific time and it will disabled again. Please share thought for achieving this whether i need to use DMA or without DMA.

SPI blocking/callback can be achieved using DMA?

Please share/suggest it urgent!!!!!!!!

Nitesh

  • Hi Nitesh,

    I would recommend that you use DMA as it allows for less CPU intervention, also you can use a callback function when using the DMA driver.
    I would read over the Device specific driver documentation for the EUSCI SPI DMA driver in order to use the driver effectively. You'll find an example of how to open and perform simple transactions there.

    You can find the documentation within your TI-RTOS installation:

    Ex) C:\ti\tirtos_msp43x_2_14_03_28\docs\docs_overview.html and navigate to TI-RTOS Driver Runtime APIs (doxygen)

    In regards to not knowing the specific byte count, you application could set up a large read transfer and call SPI_transferCancel() once you're satisfied with the amount of data that you've received.

    Best,
    Alexander
  • Thanks Alexander,

    I will try to implement by reading the driver document, it would be good if you share the link for the SPI DMA example.

    One small doubt whether i can send the multiple byte using blocking call with DMA/without DMA?

    Nitesh  

  • Hi Nitesh,

    The SPI example that ships with TI-RTOS (spiloopback) is currently unsupported for the MSP430 devices. However, you can use the SPI master transfer code within the example as a reference.

    Also we currently only support an EUSCI DMA SPI driver which is used with your device(MSP430FR5969) and to answer your second question, you can send multiple bytes per transfer as specified by the transaction count field.

    Best,
    Alexander