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.

Looking for the latest PSP and EDMA3 examples

There are lots of fancy documents about EDMA3 and references to PSP

 having an example for  EDMA3 use within edma_test.c that should be found within PSP package

but there is no PSP package with SDK7 or SDK8 or the new one SDK01

I can see the PSP 04.06.00.11 within SDK6 but i do not see any EDMA3 examples within it...

Where can I get the latest PSP and the latest tested/working EDMA3 examples

This is some kind of Catch 22... these two links are pointing at each other...

AM335x EDMA Driver's Guide within its last paragraph refers to:

Sample test application for EDMA Driver

EDMA Driver APIs are available for use only in the kernel space. Hence the sample application provided must be built as a kernel module and used. The sample EDMA application is available along with other Module examples as a tar archive in src directory of PSP release package (Directory Structure of PSP release package can be seen here:

AM335x PSP Package Contents)

Copy this sample application file in a location (preferably not inside the kernel source code) and build it as a kernel module using a make file similar to one shown below obj-m = edma_test.o KDIR = "../linux-kernel" all: make -C $(KDIR) M=$(PWD) ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- modules clean: make -C $(KDIR) M=$(PWD) clean Insert this kernel module once the kernel is up, to see the sample application working.

http://processors.wiki.ti.com/index.php/AM335x_PSP_User%27s_Guide#PSP_Package_Contents 

EDMA3 Driver

AM335x EDMA Driver's Guide 

  • Hi Naum,

    I will forward this to the SW team.

  • Hi Naum,

    Naum Grutman said:
    there is no PSP package with SDK7 or SDK8 or the new one SDK01

     

    You are correct, there is no PSP for those SDK versions. 

    You can use the edma_test.c application sources from here:
      http://processors.wiki.ti.com/index.php/EDMA_sample_test_application 

  • You can also check AM335x GEL files or starterware examples, as a referece for setting EDMA3 registers.

    Best Regards,
    Yordan
  • Yordan,

    Before I start playing with any of the EDMA3 registers... I was hoping to get an EDMA3 test provided by TI to run and PASS...

    I have run many different tests that are included within the SDK for example

    ./runltp -P am335x-evm -f ddt/lmbench  it's PASSing

    ./runltp -P am335x-evm -f ipc  it's PASSing

    ./runltp -P am335x-evm -f math it's PASSing

    etc...

    but when I run any of the edma or edma_chain or edma_link test they all FAIL

    for example:

    ./runltp -P am335x-evm -f ddt/edma -s "EDMA_S_FUNC_ASYNC "

     ./runltp -P am335x-evm -f ddt/edma -s "EDMA_M_FUNC_ASYNC "

    LTP Version:

    ###############################################################"

    Done executing testcases."
    LTP Version:
    Result log is in the /opt/ltp/results/LTP_RUN_ON-2013_Jun_26-01h_27m_13s.log "
    ###############################################################"

    Test Start Time: Wed Jun 26 01:27:14 2013
    -----------------------------------------
    Testcase Result Exit Value
    -------- ------ ----------
    EDMA_S_FUNC_ASYNC FAIL 1

    -----------------------------------------------
    Total Tests: 1
    Total Failures: 1
    Kernel Version: 3.2.0
    Machine Architecture: armv7l
    Hostname: am335x-evm

    EDMA_S_FUNC_ASYNC FAIL 1
    root@am335x-evm:/opt/ltp#

    LTP Version:

    ###############################################################"

    Done executing testcases."
    LTP Version:
    Result log is in the /opt/ltp/results/LTP_RUN_ON-2013_Jun_26-01h_27m_13s.log "
    ###############################################################"

    Test Start Time: Wed Jun 26 01:27:14 2013
    -----------------------------------------
    Testcase Result Exit Value
    -------- ------ ----------
    EDMA_S_FUNC_ASYNC FAIL 1

    -----------------------------------------------
    Total Tests: 1
    Total Failures: 1
    Kernel Version: 3.2.0
    Machine Architecture: armv7l
    Hostname: am335x-evm

    EDMA_S_FUNC_ASYNC FAIL 1
    root@am335x-evm:/opt/ltp#

    !!!   I have tried with SDK6 and Kernel 3.2 and also with SDK8 and Kernel 3.14... No luck  !!!

    Looks like other people have and had similar issues...

    Looks like somebody at TI at some point responded to somebody with the following quote:

    > On Thu, Dec 19, 2013 at 8:58 PM, Carlos Hernandez <ceh at ti.com> wrote:
    > 
    >>  Satish,
    >> 
    >> You need to also run make modules and make install.
    >> You may want to check the README-DDT file.
    >> By the way, the edma test code will not compile with newer kernels (e.g.
    >> 3.12+) as the API has changed, so we currently filter out edma test code
    >> for most platforms on testcases/ddt/Makefile.
    >> We are currently using crypto test cases to indirectly validate edma on
    >> am335x-evm.
    >> 
    >> Regards,
    >> Carlos


    !!!   I  just want for sanity sake to be able to see that EDMA indeed works out of the box...

    before I dive into it and start... Somebody at TI supposedly supports it...

    I would like to see an

    1. EDMA test module

    2. its exact Makefile  that will make it compile and link ( not something that I will need to tailor )

    3. some short instructions where to place it so it will execute and PASS...

    With all the research that I have done searching thru the internet I am yet to see that somebody

    provided anybody above 3 items...

    Thanks,

    Naum Grutman

     
  • To anybody that is reading / listening

    My comments from last Friday should not be of any surprise...

    since TI is aware of my finding for a while the same findings about EDMA tests are there since 2012 and results are the same until now...

    http://arago-project.org/testresults/logs/tigt-0001-desktop/tigt-0001-desktop/tigt-0001-desktop06_01_2012_19_06_51/files/session_iteration_1/test_1196881/dev_test2_1.html

    http://arago-project.org/testresults/logs/tigt-0001-desktop/tigt-0001-desktop/tigt-0001-desktop06_01_2012_19_06_51/session.html

    Any working EDMA test/example would be appreciated...

    Thanks,

    Naum Grutman

  • Hi Naum,

    As Yordan had mentioned earlier. Starterware has an EDMA example that might be of help to you.

    You can get the Starterware package here.

    Starterware has an EDMA example C:\ti\AM335X_StarterWare_02_00_01_01\examples\evmAM335x\edma depending on the EVM that you are using. Below is some background on the example.

    Application Use Case:
    The application demonstrates DMA transfer of data from a buffer populated with data to another buffer. DMA transfer can be done either through EDMA or QDMA based on the compile definition of macro CH_TYPE_DMA. After the transfer destination buffer is compared with source buffer and to determined pass/fail status.

    Running example:
    On execution application will perform data transfer from source buffer to destination buffer either through EDMA or QDMA mode. After the transfer destination buffer is compared with source and status is displayed on console.

    Hope this helps.

    Lali

  • Everybody seems to be missing the point I am trying to make…
    e2e.ti.com/.../1575366
    I have seen the fact that StarterWare is available and
    I have seen the fact that edmaTest.c is available within the Starterware…
    Starterware is selfcontained execution environment... so this is like
    telling me: “hey we have this nice red fire engine toy truck go and play with it in the cul-de-sac…”
    TI provided all these various SDKs 5.x thru 8.x and now 01.00 to take this AM335x
    “out of the cul-de-sac and onto the Freeway” within 3.xx Linux environments but
    the EDMA test within those SDKs does NOT PASS .
    TI’s own testing back in 2012 shown that it does not PASS… when you are
    in the Linux 3.x thru 3.xx environment… please check out the following links:

    arago-project.org/.../dev_test2_1.html
    arago-project.org/.../session.html

    When I am executing the same tests on AM335x Starter Kit I get exactly the same FAILing results.
    ###############################################################"

    Done executing testcases."
    LTP Version:
    Result log is in the /opt/ltp/results/LTP_RUN_ON-2013_Jun_26-01h_27m_13s.log "
    ###############################################################"

    Test Start Time: Wed Jun 26 01:27:14 2013
    -----------------------------------------
    Testcase Result Exit Value
    -------- ------ ----------
    EDMA_S_FUNC_ASYNC FAIL 1

    -----------------------------------------------
    Total Tests: 1
    Total Failures: 1
    Kernel Version: 3.2.0
    Machine Architecture: armv7l
    Hostname: am335x-evm

    EDMA_S_FUNC_ASYNC FAIL 1
    root@am335x-evm:/opt/ltp#

    If I have to take something out of StarterWare and adapt it to Linux 3.xx environment
    to match up all the include files and debug the code afterwards what guarantee do I have that this code
    is going to run when your own test is failing since 2012…?
    On the other hand if you would have an EDMA test that is running and PASSing within Linux 3.xx
    environment then everybody else including myself would have a proven benchmark that can be quickly adapted to ones needs…
    Why doesn’t TI fix up what had to be fixed up back in 2012 in the first place…
  • Naum,

    For a 3.xx and newer kernel, DMA_engine is used to manage EDMA channels. There is a test case in the kernel for DMA_engine that one of our developer's has used in the past and it should serve as a good guide to test and develop code in Linux to use the EDMA. It is here:

    https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/Documentation/dmaengine/dmatest.txt

    I'm sorry, I'm not in a position to try this at this time, but I wanted to share it in hopes that it get's you moving in the right direction.

  • I  find any and all of above answers  as unacceptable… 

     

    1. As stated before I would like to see TI’s  completed PASSing EDMA test within Linux environment. When that is completed I would like to see:

    -  the code

    -  the make file

    -  the script file

    Since whatever is included within the SDK is not PASSing…

    I am not sure why everybody simply avoiding above request…

     

    2. While waiting for Item#1 I have played with edmaTest within Starterware environment…

    My findings are as following:

     

    -   EDMA transfer of a 16MB buffer takes about an average 213 MicroSeconds,

    which we find too long… Please review results below…

     Which raises the following question…

    Does anybody at  TI have some kind of benchmark information as to time expectation of  copying 16MB  RAM to RAM  via EDMA etc…???

    - If  EDMAAPP_MAX_CCOUNT within edmaTest.c i.e. the C count is changed to any higher number than 1, then edmaTest  just HANGS…

     

    By the way:

    It is interesting to note that in the following forum TI employee recommends

    to leave the C count at 1…. No wonder...!!!

    https://e2e.ti.com/support/dsp/tms320c6000_high_performance_dsps/f/115/p/395063/1395787#1395787

     

    Thanks, Naum Grutman

     

    Results of copying 16MB buffer via EDMA…:

      

    StarterWare AM335x Boot Loader

    Copying application image from MMC/SD card to RAM

    Jumping to StarterWare Application...

      

    edmaTest: Initiating EDMAAppEDMA3Test Acnt=16000; Bcnt=1; Ccnt=1!!!

     

    Result 0; Ticks clocked by the timer=5123

    EDMA function used up 213 microseconds

      

    Result 1; Ticks clocked by the timer=5139

    EDMA function used up 214 microseconds

      

    Result 2; Ticks clocked by the timer=5147

    EDMA function used up 214 microseconds

      

    EDMA3Test: Data write-read matching PASSED.

    EDMA3Test PASSED.

  • Quick correction to my previous Note

    the buffer is of a size 16KB ( not 16MB ) in 213 microseconds...
  • Hi Naum,

    Were you able to try Ron's DMA_engine example?

    I'll let Ron comment about the other failing test example and if we have any benchmarks. He will be back next week.

    Thanks,

    James
  • James

    Explanation is too convoluted…

    Found dmatest that is prebuild within /opt/ltp/runtest/ddt
    But it did not produce for me anything…
    Googling dmatest produced another long list of poor souls that tried
    to use dmatest without much success.

    At the minimum I would like to see the actual printout of the execution
    and not promises that something might execute… I believe it is not too much to ask…

    Meanwhile, I am running some more benchmarks for additional algorithms/processes
    under AM335x ( within StarterWare environment… ) that I have to provide timings for.
    Even though StarterWare is not the ultimate target environment but at least it advances
    us further to evaluate the AM335x prototype and figure out its limitations…

    Thanks,

    Naum
  • Naum Grutman said:
    At the minimum I would like to see the actual printout of the execution
    and not promises that something might execute… I believe it is not too much to ask…

    Fair enough. I followed the kernel documentation in /Documentation/dmatest.txt and built the test as a module. Here's a dump of the run:

    <.26-gb9df364/kernel/drivers/dma# insmod dmatest.ko                        
    <drivers/dma# echo dma0chan0 > /sys/module/dmatest/parameters/channel        
    <rs/dma# echo 2000 > /sys/module/dmatest/parameters/timeout                  
    <ivers/dma# echo 1 > /sys/module/dmatest/parameters/iterations               
    <ivers/dma# echo 1 > /sys/module/dmatest/parameters/verbose                  
    <ivers/dma# echo 1 > /sys/module/dmatest/parameters/run                      
    [ 2613.786427] dmatest: Started 1 threads using dma0chan0
    root@am335x-evm:/lib/modules/3.14.26-gb9df364/kernel/drivers/dma# [ 2613.795826] dmatest: dma0chan0-copy0: result #1: 'test )
    [ 2613.808980] dmatest: dma0chan0-copy0: summary 1 tests, 0 failures 62 iops 498 KB/s (0)

    If you run multiple iterations, you'll get more feedback, especially with verbose set to 1. However the test is more geared to highlighting errors than it is to dumping a lot of feedback. I supposed that could easily be changed by adapting the test code.