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/AM3352: which example can I use for study EDMA

Part Number: AM3352

Tool/software: TI-RTOS

Dear sir:

      I want to test EDMA on AM335X, using RTOS, which example can I refer to reference  ?

  • Hi Hongping,

    You can explore the AM335x McASP driver examples. The McASP driver interfaces with the EDMA3/UDMA library to be able to transfer data to and from McASP peripheral and data memory.

    software-dl.ti.com/.../index_device_drv.html

    Regards,
    Pavel
  • Check also below e2e thread:

    e2e.ti.com/.../770421

    Regards,
    Pavel
  • Hi Pavel

    Can I use the api from C:\ti\pdk_am335x_1_0_13\packages\ti\starterware\include\edma.h ?which is on starterware.
  • how can I call the API on RTOS CCS project,when I include the head file and call the API it shows :undefined reference to `EDMAInit'.
    I have modified the prohect's properties like this:

  • Hongping,

    EDMAInit() from pdk_am335x_1_0_13/packages/ti/starterware/include/edma.h is used only for Starterware examples, like the one below:

    pdk_am335x_1_0_13/packages/ti/starterware/examples/example_utils/edma_utils.c

    If you are not using the legacy starterware examples, I would suggest you to use below EDMA library, which is used in the RTOS McASP example I have provided in my first reply.

    pdk_am335x_1_0_13/packages/ti/drv/mcasp/example/src/audioSample_io.c
    pdk_am335x_1_0_13/packages/ti/drv/mcasp/example/src/audioSample_main.c

    #include <ti/sdo/edma3/drv/edma3_drv.h>
    #include <ti/sdo/edma3/rm/edma3_rm.h>
    #include <ti/sdo/edma3/drv/sample/bios6_edma3_drv_sample.h>
    #include <ti/csl/csl_edma3.h>

    These H files are located at:

    edma3_lld_2_12_05_30C/packages/ti/sdo/edma3/
    pdk_am335x_1_0_13/packages/ti/csl/csl_edma3.h

    Regards,
    Pavel
  • Hi Pavel

        Compared to the EDMA LLD,I  prefer to use starterware for my prohect,can I use these api

    on pdk_am335x_1_0_13/packages/ti/starterware/examples/example_utils/edma_utils.c for my project?

    my purpose is to use GPMC to read FPGA data. EDMA needs to be used here for data relocation and it is build on RTOS.

  • Hongping,

    Please note that the support for starterware package that is include in Processor SDK RTOS is limited to bootloaders and board package. We no longer recommend use of this software for new development and have removed any CCS Projects in that package as they are no longer being maintained and migrated to latest CCS versions.

    Check below e2e threads for details:

    e2e.ti.com/.../789981
    e2e.ti.com/.../786878
    e2e.ti.com/.../777953
    e2e.ti.com/.../784394
    e2e.ti.com/.../782482

    e2e.ti.com/.../664174
    e2e.ti.com/.../679640

    Regards,
    Pavel
  • Dear Pavel
    On the AM335x McASP driver examples,I only found that the API of "edma3init" was called, but I did not find any other calls about EDMA, such as setting some parameters. Could you please tell me what is the configuration process of EDMA using EDMA LLD.

    BR!
  • Hongping,

    Below McASP files are related to EDMA configuration, please refer to these:

    pdk_am335x/packages/ti/drv/mcasp/example/src/audioSample_io.c
    pdk_am335x/packages/ti/drv/mcasp/example/evmAM335x/src/mcasp_cfg.c

    pdk_am335x/packages/ti/drv/mcasp/soc/am335x/mcasp_soc.c

    pdk_am335x/packages/ti/drv/mcasp/src/mcasp_drv.c
    pdk_am335x/packages/ti/drv/mcasp/src/mcasp_ioctl.c

    pdk_am335x/packages/ti/drv/mcasp/src/dma/V0/mcasp_dma.c

    You can also check the below user guide:

    pdk_am335x/packages/ti/drv/mcasp/docs/MCASP_LLD_SDS.pdf


    Regards,
    Pavel
  • Dear Pavel

        thanks for your help.but I when I tried to use the api as follows:

    #include <stdint.h>
    #include <stdbool.h>
    #include <stddef.h>

    #include <ti/sdo/edma3/drv/edma3_drv.h>
    #include <ti/sdo/edma3/rm/edma3_rm.h>
    #include <ti/sdo/edma3/drv/sample/bios6_edma3_drv_sample.h>

    extern EDMA3_RM_Handle app_EDMAInit(void);

    EDMA3_RM_Handle app_EDMAInit(void)
    {
    EDMA3_DRV_Result edmaResult = 0;
    EDMA3_RM_Handle gEdmaHandle = NULL;

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

    return gEdmaHandle;
    }

    Error while program running edma3init,the log show:


    CortxA8: Unhandled ADP_Stopped exception 0x8103CC58.

  • Hongping,

    I see you align your code more to McSPI test than to McASP test:

    pdk_am335x/packages/ti/drv/spi/test/src/main_mcspi_test.c

    Can you check at which line of code exactly the error is generated? You should trace inside the edma3init() function. Check if the flow goes into 1 or 2

    1. pdk_am335x_1_0_13/packages/ti/drv/spi/soc/am335x/sample_arm_init.c

    2. edma3_lld_2_12_05_30C/packages/ti/sdo/edma3/drv/sample/src/sample_arm_init.c
    edma3_lld_2_12_05_30C/packages/ti/sdo/edma3/drv/sample/src/sample_init.c
    edma3_lld_2_12_05_30C/packages/ti/sdo/edma3/rm/sample/src/sample_arm_init.c
    edma3_lld_2_12_05_30C/packages/ti/sdo/edma3/rm/sample/src/sample_init.c

    If you can go through the code step by step and find the exact line that generates the error, we can get more hints why your test fails.


    Check also if below e2e threads will be in help:

    e2e.ti.com/.../790316
    e2e.ti.com/.../2848802
    e2e.ti.com/.../781278
    e2e.ti.com/.../774218

    Regards,
    Pavel