• 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 » Microcontrollers » Hercules™ Safety Microcontrollers » Hercules™ Safety Microcontrollers Forum » UART implementation using HET Timer. Trying to achieve 208us using HET
Share
Hercules™ Safety Microcontrollers
  • Forum
  • E2E Wiki
Options
  • Subscribe via RSS

UART implementation using HET Timer. Trying to achieve 208us using HET

UART implementation using HET Timer. Trying to achieve 208us using HET

This question is not answered
Prasad Go
Posted by Prasad Go
on Jul 18 2012 17:49 PM
Prodigy95 points

I am trying to implement UART using HET timer. Required baud rate is 2400 (i.e. 416us/bit). During receive I am receiving an falling edge interrupt from GPIO. When I receive this interrupt, i need to start HET timer and get an interrupt at 208us. Have difficulty achieving this.

Is there a minimum time to get an interrupt using HET timer?

Do you have any sample code that you can share?

My sysclock = 7.2738 MHz and iclk=3.686 MHz

Prasad

Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Jean-Marc Mifsud
    Posted by Jean-Marc Mifsud
    on Jul 19 2012 08:25 AM
    Expert8985 points

    Prasad,

    Thanks for using our forum.

    Which device are you using?

    Best regards,

    Jean-Marc

    Application Engineer


    If my reply answers your question please click on the green button "Verify Answer".

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Prasad Go
    Posted by Prasad Go
    on Jul 19 2012 09:50 AM
    Prodigy95 points

    TMS470R1B1M

    Using this device with 7.3728 MHz oscillator, sysclock = 7.3728 MHz and iclk=3.6869 MHz

    Please let me know ur suggestions.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Jean-Marc Mifsud
    Posted by Jean-Marc Mifsud
    on Jul 19 2012 10:48 AM
    Expert8985 points

    Prasad,

    One option is to use a CNT instruction in your HET code. This instruction can generate an interrupt on overflow.
    You have to set the MAX count value (25bits) that will match your 208us interrupt requirement.
    CNT Instruction counts HET Loop Resolution.

    Are you using your HET for something else? If yes can you provide the definition of LR and HR so I can make the math for you?

    Best regards,

    Jean-Marc

    Application Engineer


    If my reply answers your question please click on the green button "Verify Answer".

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Prasad Go
    Posted by Prasad Go
    on Jul 19 2012 13:22 PM
    Prodigy95 points

    Attached are the HET files and main application file with sysclock=7.3728MHz.

    Code in main file uses HET to get timing for 2400 baudrate serial communication. 1bit length = 416us and 1/2 bit lenght =208us. Data is received and sent using GPIO and not HET pins.

    So, during transmit, ucontroller starts HET to interrupt at 416us. and clocks out a bit on GIOA[0] every HET interrupt. Command sent out is a 1byte with 1start bit, 1 parity bit and 1stop bit.

    During receive, on receiving a falling edge interrupt, HET is initialized for 1/2 bit length (208us) and when the HET interrupt occurs, input bit is read from GIOA[4]. After reading the GIOA[4], HET is initialized for 1bit length (416us). When HET interrupt occurs, input bit is read from GIOA[4]. After reading HET is initialized for 1bit length (416us). This process repeats untill the complete response is read -- response is a total of 22 bits.

    startbit - 8bitdata - paritybit - stopbit - stopbit - startbit - 8bitdata - partitybit - stopbit

    I am having difficulty achieving 208us with HET. Please review and let me know ur findings.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Jean-Marc Mifsud
    Posted by Jean-Marc Mifsud
    on Jul 19 2012 13:29 PM
    Expert8985 points

    Prasad,

    I don't see any attachment.

    Can you resend?

    Best regards,

    Jean-Marc

    Application Engineer


    If my reply answers your question please click on the green button "Verify Answer".

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Prasad Go
    Posted by Prasad Go
    on Jul 19 2012 13:42 PM
    Prodigy95 points

    3201.TISupport_1wire7MHz.zip

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Jean-Marc Mifsud
    Posted by Jean-Marc Mifsud
    on Jul 20 2012 09:23 AM
    Expert8985 points

    Prasad,

    I'm working on your question.
    I have to reproduce your environment to be able to understand the problem.
    Without the full project, I have to re-write some test code. Will it be possible to share the full project?
    I can provide my email address if you don't want the code to be public.
    (I'm not familiar with the specific HET code, I did not write it)

    If you find a solution to your problem, please let me know.

    Best regards,

    Jean-Marc

    Application Engineer


    If my reply answers your question please click on the green button "Verify Answer".

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Prasad Go
    Posted by Prasad Go
    on Jul 20 2012 10:14 AM
    Prodigy95 points

    Sure,Please send me ur email so I can send you the project in zip.

    thanks

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Jean-Marc Mifsud
    Posted by Jean-Marc Mifsud
    on Jul 20 2012 14:58 PM
    Expert8985 points

    Prasad,

    I've send you a "friend request" via the forum. Once you accept it we should be able to exchange emails.

    Best regards,

    Jean-Marc

    Application Engineer


    If my reply answers your question please click on the green button "Verify Answer".

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Jean-Marc Mifsud
    Posted by Jean-Marc Mifsud
    on Dec 14 2012 10:21 AM
    Expert8985 points

    Prasad,

    What is the status on your post? Did I answered your question?

    If so, can you mark it as "Verified Answer" so I can close this thread?

    Best regards,

    Jean-Marc

    Application Engineer


    If my reply answers your question please click on the green button "Verify Answer".

    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