• 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 » Low Power RF & Wireless Connectivity » Low Power RF Proprietary Software & SimpliciTI Forum » CC251x: Using USART by DMA problem, last character corrupted
Share
Low Power RF & Wireless Connectivity
  • Forums
  • Announcements
  • Files
  • E2E Wiki
Options
  • Subscribe via RSS

Forums

CC251x: Using USART by DMA problem, last character corrupted

This question is not answered
spachner
Posted by spachner
on May 29 2009 09:40 AM
Expert1505 points
Dear Forum, I trying to use DMA for USART transmission which basically works. But when I start a 2nd USART DMA right after the 1st DMA completion interrupt occurs the last character(s) from the 1st DMA are not transmitted. It seems that the 2nd DMA disturbs the end of the 1st one. I had a look to the timings by oscilloscope: When the DMA completion interrupts occurs I found that up to two more characters are output by USART. This is probably the problem! I know that the USART output register is double buffered and expected that one character is still output when the DMA interrupts happens, but why two?? The DMA interrupts is describes in the manual that it is generated when the last byte is transferred. Do I have to wait for some special flags after the 1st DMA interrupts occurs to be safe to start the next DMA? Please help regards
CC2510 CC2511 DMA USART UART
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Siri
    Posted by Siri
    on Jun 03 2009 04:02 AM
    Expert5005 points

    Hi

    The DMA will be done writing data to the USART before the USART is done transmitting the data. After the DMA interrupt occurs you must therefore wait for an interrupt from the USART saying that it is done too.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • spachner
    Posted by spachner
    on Jun 03 2009 04:19 AM
    Expert1505 points
    Hi, yes, I tried this already by polling the USART after the DMA interrupt in order to wait until the char is transmitted with: while(!(U0CSR & 0x02)); but the event is raised when the USART _starts_ output the char. So this failed, too. Next try was to wait until the USART is not active anymore with: while(U0CSR & 0x01); which actually works but I do not like this workaround because the U0CSRT.ACTIVE flag is also raised when receiving a char. Any more suggestions. reagards spachner
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Siva12347
    Posted by Siva12347
    on Jun 03 2009 04:44 AM
    Prodigy40 points

    Hi,

    The source buffer in external memory should be aligned to cache line width. Hope you are #pragma for the same.

     

    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