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.

Using DMA to Copy from OMX_Buffer to CMEM Allocated Buffer



Hello all,

  As the subject suggests I am trying to implemet a DMA transfer to extract an image out of an incoming omx buffer and throw a modified image into the buffer.  I am using DMA since the OMX_Buffer is not cacheable.

  I have spent the day reading on EDMA librarys available to us.  I started with ecpy but it turns out the dev kits I have does not have an ecpy compiled for ARM.  Thus, I have reverted to acpy3.

  I have two questions:

  1. Has anyone does this approach before?  I think I MUST use acpy3.
  2. Is there any documentation on compiling?  I am having trouble finding the necessary header files.  Currently, I am experience problems due to "Int", "Void", "String" missing.  What header file are these declared in (something like std.h for the linux-devkit).
Thank you for any assistance.
  • What device are you on ? And what version of Framework Components or Codec Engine are you using ?

  • Hi Gunjan,

      I am on DM8168.  My framework component version is 3.21.

      I would like to note your name is familiar, I've read A LOT of your posts today.  I appreciate all the information you've presented so far, it's been helpful to get me this far.

    Constantin

    P.S - Should I just use the std.h in the component-sources/xdctools to compile my acpy3 program?  I found the wiki on which "std.h" I should use... but I am unsure if that only applies to the dsp-devkit.

    P.P.S - I have high hopes for this approach as we can get the Physical Memory Location using CMEM_getPhys()

  • Constantin,

    I'm glad to hear you found my posts helpful.

    Regarding DM8168, Framework Components (that include both ACPY3 and ECPY), supports DMA transfers only on the DSP side and not the ARM side. Neither ACPY3 nor ECPY is supported for the ARM. 

    Typically ARM-side would use the EDMA3 LLD driver side APIs directly to perform transfers.

    If you need to do DMA on the DSP side, I could point you to some FC examples.

    Thanks,

    Gunjan.

  • Gunjan,

      Thank you for this information.  So is my goal achievable?  And does this mean I can't stop trying to figure out what libraries I need to link into when using acpy3... I'm up to 5.

      My ultimate goal is to take an image from an omx_buffer.  A simple memcpy creates drastic slowdown and ARM load...  I thought DMA was my only approach.

      Are there any examples of the EDMA3 LLD use for EDMA?

      Thank you.

    Constantin

  • Gunjan,

      Also another quick question... If acpy3 is not available for arm why are there compiled static libraries/archives?  Furthermore, I'm having difficulty finding the necessary LLD libraries in my ezsdk.  All the links I've found for downloading newer drivers are for windows host.  I need the linux versions.

      The reason I ask, is I'm reading through this the LLD PDF, and it continually mentions using ACPY3 for simple a "memcpy" from A to B.

    Constantin

  • Constantin,

    Those acpy3 arm libs were to support older DM355 devices. As far as TI816X is concerned, Framework Components supports DMA transfers only on the DSP-side.

    The EDMA3 Low Level Driver along with documentation is all available here:- 

    http://software-dl.ti.com/dsps/dsps_public_sw/sdo_tii/psp/edma3_lld/index.html

    You should be able to find information and examples here on how to do a simple DMA transfer.

    Thanks,

    Gunjan.

  • Gunjan,

      I have been trying to figure out these supplied drivers but I must be missing something...  I'm having trouble finding the necessary static libraries to link to.  I have downloaded the lld packages that came with my SDK (02_11_02_04) and the newest version (02_11_06_01), but I can't get any libraries to work.

      I figure I'm supposed to use the libraries in the "ti816x-evm/a8/release"  but at link time I'm told "file format not recognized".  So I switched to using the libraries in:

    ./edma3_lld_02_11_06_01/packages/ti/sdo/edma3/rm/lib/generic/arm9/release/
    ./edma3_lld_02_11_02_04/packages/ti/sdo/edma3/rm/lib/generic/arm9/release/edma3_lld_rm.ae9
    ./edma3_lld_02_11_02_04/packages/ti/sdo/edma3/drv/lib/arm9/release/edma3_lld_drv.ae9

    Now the 6.01 version doesn't have the "drv" static libraries at all, and both of them do not have any compiled "sample" static libraries.  I see an arm9 compiled static library under:

    ./edma3_lld_02_11_02_04/packages/ti/sdo/edma3/drv/sample/lib/omapl138-evm/arm9/release/edma3_lld_drv_sample.ae9

    But I don't think I'm supposed to use that version?  Could you offer any assistance?

  • Gunjan,

      This question shows the same problem as me: http://e2e.ti.com/support/microcontrollers/hercules/f/312/p/148300/555597.aspx

      Compiling with the arm compiler from $EZSDK gives me the same error message.  Are these related?  (ezsdk version, 5.03.1.15)

    Constantin

  • Constantin,

    Since you are now having trouble with EDMA3 LLD, you may have better luck starting a new post with EDMA3 LLD in the title. I'm sure you'll find some help. I don't know enough about the ARM-side EDMA3 LLD to be able to answer your question. But I'm sure someone from the EDMA3 LLD team will respond to your (new) post.

    Thanks,

    Gunjan.

  • Hi Constantin
    Please help me!
    I also need copy data from arm-side,
    Will you solve it?
    thanks!