• 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 » MSP430™ Microcontrollers » MSP430 Ultra-Low Power 16-bit Microcontroller Forum » generating interrupts on MSP430
Share
MSP430™ Microcontrollers
  • Forum
  • Announcements
  • E2E Wiki
Options
  • Subscribe via RSS
MSP430 Resources
  • MSP430 Product Folder
  • MSP-EXP430G2 - MSP430 LaunchPad Value Line Development kit
  • MSP430 Getting Started Guide
  • MSP430 Microcontroller Projects
  • More Resources >
  • generating interrupts on MSP430

    generating interrupts on MSP430

    • RFeng5105
      Posted by RFeng5105
      on Dec 10 2008 16:09 PM
      Prodigy190 points

      Hello,

      I need a guideline for generating a series of Timer interrupts on my code. I am using MSP4302618 and i have a 32 Khz crystal on my board, i can generate an interrupt by setting CCRO regitser values equal to given time. But now i want to generate a series of interrupts occuring at different time interval or on different conditons. For example there are four points T1,T2,T3,T4. My timer A is in contionus mode (i assume for this kind of thing i have to run in this mode). Is there anyone who can guide me how to generate such an interrupt by using TimerA. Should i use Capture mode or Compare mode. As until now i have only worked with Compare mode.

      Best Regards

      Interrupt MSP430 Timer_A
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • BrandonAzbell
      Posted by BrandonAzbell
      on Dec 14 2008 12:58 PM
      Guru54850 points

      RFeng

      i want to generate a series of interrupts occuring at different time interval or on different conditons. For example there are four points T1,T2,T3,T4.

      Is there anyone who can guide me how to generate such an interrupt by using TimerA.

      What is the shortest time interval between these points T1, T2, T3 and T4?

      The method I would suggest is to configure the TimerA for an interrupt rate/interval that is the least common multiple of each of the points T1, T2, T3 and T4.  In this way, you could generate software timers which have the base clock rate, or tick, which is generated by the TimerA interrupt.

      As an example for the purpose of illustration, if the time intervals of your points were T1=10msec, T2=15msec, T3=30msec and T4=50msec, then the least common multiple would be 5msec.
      I would setup TimerA to generate interrupts on a 5msec basis, then in the TimerA interrupt service routine it would keep track of the system tick and perhaps update some data structures that account for the various time intervals T1, T2, T3 and T4.
      Once the software timers expire, then a "software task" can be generated which corresponds to point T1.  Then a new software timer can be configured.

       

      RFeng

      Should i use Capture mode or Compare mode. As until now i have only worked with Compare mode.

      I would think that Compare mode should be used.

      Brandon

      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