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.

RTOS/PROCESSOR-SDK-OMAPL138: SPI-DMA for TI-RTOS SDK

Part Number: PROCESSOR-SDK-OMAPL138
Other Parts Discussed in Thread: OMAPL138

Tool/software: TI-RTOS

Hi everyone,

İ am trying to use SPI-EDMA with "pdk_omapl138_1_0_4" library. it dosent have spi-edma example, it has only spi example. i need to know how can i enable dma for omapl138 in this example. "SPI_v0_HWAttrs" struct  has "dmaMode" member. And project has predefine #ifdef SPI_DMA_ENABLE, but this define not acccessible for omapl138. So i cant enable edma3. is there any way enable edma3 for omapl138 in pdk_omapl138_1_0_4?

Thank you all... 

  • Hi Cvetolin,

    Thank you for your response. i tried this examples already.  I cant build code in mcspi example in pdk_omapl138. Exact path is "/home/firat/ti/pdk_omapl138_1_0_4/packages/ti/drv/spi/test/src/main_mcspi_test.c" . This example using spi-dma. i researched the code and tried rewrite for my project.  

    This part of code is important for me:

    #ifdef SPI_DMA_ENABLE
    EDMA3_RM_Handle gEdmaHandle = NULL;

    /**
    * \brief Function to initialize the edma driver and get the handle to the
    * edma driver;
    */
    static EDMA3_RM_Handle MCSPIApp_edmaInit(void)
    {
    EDMA3_DRV_Result edmaResult = EDMA3_DRV_E_INVALID_PARAM;
    uint32_t edma3Id;

    if (gEdmaHandle != NULL)
    {
    return (gEdmaHandle);
    }

    edma3Id = 0;
    gEdmaHandle = (EDMA3_RM_Handle)edma3init(edma3Id, &edmaResult);
    if (edmaResult != EDMA3_DRV_SOK)
    {
    /* Report EDMA Error */
    System_printf("\nEDMA driver initialization FAIL\n");
    }
    else
    {
    System_printf("\nEDMA driver initialization PASS.\n");
    }
    return(gEdmaHandle);
    }
    #endif

    I need a "gEdmaHandle" for point to struct member. SPI_v0_HWAttrs struct has member  void    *edmaHandle.  So  "gEdmaHandle" in example points to this struct member. There is no problem thus far. But this line in code

     gEdmaHandle = (EDMA3_RM_Handle)edma3init(edma3Id, &edmaResult);

    is not working for omapl138. edma3init(.., ..) function not resolved symbol in debugger. So i passed compiler but i am getting error at linker. 

    By the way in the top of code #ifdef SPI_DMA_ENABLE argument is not for OMAPL138 in the library. i manually defined for manipulate but this is not working .

  • Hello Firat,

    Sorry for the delay, I was out of office.

    While we don't have any examples or test cases for SPI DMA on omapl138, the SPI driver does support DMA. The same driver is used for our K2G devices which have a SPI DMA test case that you can use as reference.

    edma3init does need to be called from the application level so you will need to either bring it in manually or link in the library.

    If you are still having issues with this, please share what errors you are getting.
  • Update:

    Starting with the v5.3 release, there is a SPI + DMA example provided in Processor SDK RTOS. 

    To build the example CCS project, please follow the steps here: http://software-dl.ti.com/processor-sdk-rtos/esd/docs/latest/rtos/index_device_drv.html#building-spi-examples