• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Digital Signal Processors (DSP) » OMAP™ Processors » OMAP-L13x, AM1x and C674x Processors Forum » Data transfer through EMIF with EDMA for OMAP L138
Share
OMAP™ Processors
  • Forums
  • Announcements
Options
  • Subscribe via RSS
Resources
  • OMAP-L1x DSP+ARM9™-based Processors Product Folder
  • OMAP3525/30 DSP+ARM Cortex™-A8-based SOCs Product Folder

  • Top OMAPL Wiki Links
  • OMAPL3x Schematic Review Checklist
  • OMAPL13x Boot resources

  • OMAPL Document Resources
  • OMAPL137 Technical reference manual
  • OMAPL138 Technical reference manual
  • OMAPL Boot loader App Notes
  • Forums

    Data transfer through EMIF with EDMA for OMAP L138

    This question is not answered
    Xu Tong
    Posted by Xu Tong
    on Apr 13 2012 04:01 AM
    Prodigy70 points

    Hello,

    I would like to transfer buffer data out to the EMIF by EDMA for the OMAP L138, and the transmission is controlled by ARM side under Linux OS. In order to simplify the testing, buffer size is set to 24bytes, AB-synchronization is used. The PaRAM settings are as follow:

     

    acnt = 2

    bcnt = 4

    ccnt = 3

    src bidx = 2

    src cidx = 8

    dst bidx = 2

    dst cidx = 8

     

    PaRam data is as follow:

    opt: 80300004

    src addr: c1e41000

    a_b_cnt: 40002

    dst addr: 60000000

    src_des_bidx: 20002

    link_bcntrld: FFFF

    src_dst_cidx: 80008

    ccnt: 3

     

    When the destination address is set to internal memory, the above task is simply the memory copy and everything is working fine. But when the destination address is set to the EMIF address (0x60000000), I found the following issues (with the help of the Logic Analyzer):

    1) There are only 4 write cycles (bcnt) on the EMIF bus, and the count for 3rn dimension (ccnt) has same effect as 1 no matter how I change it. (The CS2 lasts for 4 write cycles only).

    2) The EMIF address bus is incremented but per every 2 write cycles.

    For above 1st issue: I found that there were 3 times manually triggers but only the first trigger had the effect on the EMIF bus, while the other 2 triggers received the transmission completion interrupt, but nothing on the EMIF bus.

    For the 2nd issue, the bus can be incremented per write cycle when the destination B index is 4, but the transmission is not optimized then.

    Is there something wrong in the above settings?

    Thanks

    EDMA OMAP-L138 Linux EMIFA
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • Ranjith Parakkal
      Posted by Ranjith Parakkal
      on Apr 13 2012 06:51 AM
      Prodigy390 points

      Did you verify if the write is happening into DDR as expected ? If you are checking from ARM you will need to invalidate the cache in the destination region to check if EDMA has written correctly.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Xu Tong
      Posted by Xu Tong
      on Apr 15 2012 23:18 PM
      Prodigy70 points

      Hello,

      Thank you for the respond.

      I haven’t checked the DDR but I have checked the EMIF data bus and the data are as expected.

      The initialized 24 bytes EDMA buffer data are:

      0x0, 0x1, 0x2 …… 0x16, 0x17.

      The EMIF data bus output are:

      0x0100, 0x0302, 0x0504, 0x0706

      When I set the bcnt = 12 and ccnt =1, I can see all the 24 bytes data on EMIF data bus as expected. Hence, I believe the DDR should be correct.

      More finding: if the EDMA changed to the A-Synchronization mode, event missing will occur and only one write cycle can be seen on the EMIF bus.

      My analysis is that:

      - Since the memory copy is correct (when the destination address is set to the internal memory address), the EDMA PaRAM should be correct and functioning

      - When the destination address is set to EMIF, CS2 can be detected and data are expected except that the data transmission is stopped in the half way. EDMA on the EMIF start to function also.

      I lose the direction and really don’t know where the possible error in the above EDMA settings is?

      Best Regards

      xutong

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Ranjith Parakkal
      Posted by Ranjith Parakkal
      on Apr 16 2012 06:55 AM
      Prodigy390 points

      Xu,

      Its very important to make sure that you are not making a wrong observation with the Logic Analyzer. So its best that you first verify the DDR to see if the data has been written correctly, before you debug any further.

       

      >> if the EDMA changed to the A-Synchronization mode, event missing will occur and only one write cycle can be seen on the EMIF bus.

      Can you please clarify what you mean by " event missing will occur and only one write cycle can be seen on the EMIF bus"

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Xu Tong
      Posted by Xu Tong
      on Apr 17 2012 01:19 AM
      Prodigy70 points

      Hello,

      Thanks for the guide.

      - DDR verification

      My understanding is that, the PaRAM and EDMA buffer data are located inside the SDRAM and they are the all to be verified. Please correct me if there is anything wrong and my checking steps as follow:

       

      Kernel edma_read_slot() is used to read back the PaRAM data, and it has been done in my first post to show the PaRAM setting data.

      Kernel dam_alloc_coherent() is used to reserve the continues memory as the buffer inside the SDRAM. This buffer value is set to 0x0, 0x01, 0x02, …… 0x17 as stated in my previous post, and it is read back before and after the dma transmission. The buffer values are correct and constant.

      Are there any more things need to be checked or my checking method is wrong?

      -         For A-Synchronization event missing issue

      PaRAM opt is set to 0x80300000 while remain the rest PaRAM data.

      Kernel edma_alloc_channel() is used to set up the dma ISR, and the ch_status = -1 indicate that the dma EMR register for the used dma channel is set. But there is no this issue for the AB-Synchronization.

      -         Test observation

      You are right that it is very important to have the correct test observation with the test instrument, and we have to make sure the output performance can meet the required observation or requirement verified by the test equipment.

      Could you please let me know whether you have find or suspect any wrong test observation from above test description?

      My Logic Analyzer setting is as follow:

      CS2 falling edge is set to the triggering signal and monitoring signals are WR, Data bus and address.

      This should be the very simple test setup as only my test application uses the EMIFA bus CS2, and I really got the expected data output when the EDMA PaRAM ccnt  = 1, and I used this setup to verify the EMIF timing setup before.

      In order to prove my test observation, I created one 16bits buffer and used the while loop to output the buffer data to the EMIF data bus with address increment but without using the DMA, I got the expected data output on the data bus also, but more importantly, I got the exactly same EMIF address bus issue as using the EDMA, that is “The EMIF address bus is incremented but per every 2 write cycles”.

      For more debugging, I found that, for data output to EMIF virtual address 0xc3000000 and 0xc3000002, there is no changing on the EMIF address bus! The EMIF address bus will increment for 1 for the 0xc3000003 and 0xc3000004, which causes the above EMIF address issue.

      I changed my focus on the EMIF from EDMA and checking the EMIF setting now. Honest speaking, from the moment I got the same EMIF address issue by using 2 different mechanisms, I stated to doubt the EMIF hardware core. Could the TI hardware experts help to check this issue also?

      Thanks and Best Regards

      xutong

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Ranjith Parakkal
      Posted by Ranjith Parakkal
      on Apr 17 2012 04:16 AM
      Prodigy390 points

      XU,

      The PARAM settings are not written into DDR(but into some other memory which you can consider as EDMA registers).

      Have you verified the output buffer location after the DMA was triggered and completed. Does it contain correct output values ?

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Xu Tong
      Posted by Xu Tong
      on Apr 17 2012 06:13 AM
      Prodigy70 points

      Hello,

       

      Thanks for the reply.

      I did check the output buffer before and after the DMA transfer via EMIF. As stated in my last post, its contains are correct and constant. As the normal user for the EDMA, I can follow the datasheet to configure and check the PaRAM and output buffer only.

      For the EMIF address issue, I have found the solution when I did the EMIF bus testing. My test observation is correct but I have the wrong understanding before. As for the correct hardware design for the EMIF bus, EM_A[0] should be connected to the A[1] of the 16bits Asyn memory, and it should be changed per 2 write cycles.

      The issue is focusing back on the EMIF bus EDMA 3D transmission now: the EDMA 2D transmission is ok but fails on 3D. According the datasheet, the maximum value for the bcnt <=65535, but my application may need to output more values and the 3D transmission has to be used. I am not sure whether this requirement is too greedy, but this is the user requirement unless I can found the valid reason to change it.

      Best Regards

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    TI E2E™ Community
    • Support Forums
    • Blogs
    • Videos
    • Groups
    • Site Support & Feedback
    • Settings
    TI E2E™ Community Groups
    • TI University Program
    • Make the Switch
    • Microcontroller Projects
    • Motor Drive & Control
    Other Communities
    • Deyisupport
    • Designsomething.org
    • beagleboard.org
    • TI on Element 14
    • TI on TechXchangeSM
    Other Technical & Support Resources
    • WEBENCH® Design Center
    • Product Information Centers
    • Technical Documents
    • TI Design Network
    • TI Technical Articles
    • TI Training

    All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

    Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

    Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
    TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

    TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
    embedded processors, along with software, tools and the industry’s largest sales/support staff.

    © Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
    Trademarks | Privacy Policy | Terms of Use