• 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 Hardware & Tools Forum » CC2540 Hal UART DMA Stop bit problem
Share
Low Power RF & Wireless Connectivity
  • Forums
  • Announcements
  • Files
  • E2E Wiki
Options
  • Subscribe via RSS

CC2540 Hal UART DMA Stop bit problem

CC2540 Hal UART DMA Stop bit problem

This question is answered
Peng Jeff
Posted by Peng Jeff
on Aug 27 2012 02:39 AM
Prodigy220 points

Hi there,

I am using the Hal UART DMA mode to send test data: 0x55, 0x55, 0x55 from CC2540.

When I monitor the TXD output on the oscilloscope, Instead of 1 stop bit, I found the stop bit duration is 2 bits actually.

And If I set UxUCR = UCR_STOP | UCR_SPB; (2 High stop bits), I found the stop bit duration is 3 bits actually.

I tried the 115200bps and 57600bps,  they have the same problem.

Are there some thing wrong with the Hal UART driver?  How can I set 1 stop bit precisely?

Thanks a lot!

Jeff

uart DMA hal cc2540 Stop bit
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Peng Jeff
    Posted by Peng Jeff
    on Aug 27 2012 22:24 PM
    Prodigy220 points

    Hello again!

    After a few more tests,  I found when CC2540 send data from UART continuously,  It will add an idle bit after every stop bits.

    I tried 2 stop bits, and the idle bit will after 2 stop bits.

    I tried 9bit mode, and CC2540 will add the parity bit before stop bit, but 1 idle bit still after the stop bit.

    I tried Low stop bit, and the idle bit also became Low.

    I tried both the ISR mode and DMA mode, they both have this idle bit.

    How can I remove this idle bit?  Is this some kind of CC2540 USART hardware limitation?

    Thanks for your attention and waiting for a solution.

    Jeff

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Eng351
    Posted by Eng351
    on Aug 28 2012 00:32 AM
    Expert2980 points

    why do you need to remove it? it may be overhead delay in processing the next byte

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Peng Jeff
    Posted by Peng Jeff
    on Aug 28 2012 10:00 AM
    Prodigy220 points

    Because the receiving side wants 1 stop bit precisely.

    How can I remove this overhead delay?

    Can I fix this by modify the _hal_uart_dma.c file?

    Thanks a lot.

    Jeff

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Dirty Harry
    Posted by Dirty Harry
    on Aug 28 2012 10:07 AM
    Verified Answer
    Verified by Peng Jeff
    Mastermind19350 points

    There is a H/W bug in the UART peripheral that is adding an extra stop bit and there is no S/W workaround.

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Peng Jeff
    Posted by Peng Jeff
    on Aug 28 2012 10:10 AM
    Prodigy220 points

    That's all I need to know:-)

    Thanks for your help!

    Jeff

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • rider
    Posted by rider
    on Aug 30 2012 08:43 AM
    Intellectual330 points

    Is it possible to use UART with DMA support?

    In the Software Developers Guide on page 29 it says:

     HAL_UART_DMA – This symbol sets the CC2540/41 UART interface to use DMA mode, and
    should  be  either  left  undefined  or  set  to  0.  The  CC2540/41  does  not  currently  support  this
    option.

    Is it now supported or not?

    cc2540 uart dma mode
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Dirty Harry
    Posted by Dirty Harry
    on Aug 30 2012 10:27 AM
    Suggested Answer
    Mastermind19350 points

    Actually it became the preferred mode for using the UART as of the 1.2.1 release - the documentation must not have been updated.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • rider
    Posted by rider
    on Aug 30 2012 10:30 AM
    Intellectual330 points

    Thanks for the fast reply!

    I looked up in the 1.2.1 release documentation and ask for correction in future versions.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • tylerw
    Posted by tylerw
    on Oct 08 2012 12:29 PM
    Intellectual525 points

    Is the H/W bug documented anywhere?  Does it affect the Rx behavior too or does the stop bit behavior become asymmetrical (ie 2 tx stop bits, still only 1 rx stop bit expected)?

    Thanks

    CC2540 USART STOP BITS
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Dirty Harry
    Posted by Dirty Harry
    on Oct 08 2012 12:57 PM
    Suggested Answer
    Mastermind19350 points

    Yes, the H/W bug is documented right here in this thread de facto.

    There is no adverse effect on Rx - the 'stop bit' is the idle state, so 1..N stops bits per byte by the transmitting H/W will be correctly interpreted by the CC254x UART receiver.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Victor Farias Monteiro
    Posted by Victor Farias Monteiro
    on Oct 16 2012 07:16 AM
    Intellectual330 points

    Hi,

    I am working with CC2530ZDK and trying to use the UART. I am using UART 1 alternative 2. I would like to send just 1 stop bit, but when I configure it for this, the CC2530 sends 2 stop bits, and when I configure it for 2 stop bits, it sends more then 2.

    What should I do to fix this?

    best regards,

    Victor Farias.

    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