• 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 » Help - overwriting DCOCTL
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 >
  • Forums

    Help - overwriting DCOCTL

    This question is not answered
    Andres Aguirre
    Posted by Andres Aguirre
    on May 07 2012 16:48 PM
    Prodigy100 points

    I am having a serious problem with my  MSP430F2618 (I am using IAR Workbench 5.1) . I really need ideas/help on how to track it down.

    After initialization, the clock module is set to: DCOCTL = 0x7E, BCSCTL1 = 0xBD, BCSCTL2 = 0x30 and BCSCTL3 = 0x0C. The specific values are not important. What is important is that, unexpectedly, those values change to: DCOCTL = 0x60, BCSCTL1 = 0x87, BCSCTL2= 0x00 and BSCCTL3 = 0x04.

    These values are the default values after a reset. But there is no reset happening as far as I can see. And not even an oscillator fault. I have no idea why this is happening. I have looked all over my code and I just can't find what I am doing wrong. And worse, I do not know how to troubleshoot this problem.

    I have tried to set up a breakpoint to see who is writing to those locations (Range @ Memory:0x56-0x58 [MAB-RW] ). But it does not trigger.

    I am sure some of you will have some helpful ideas on what to try to figure this out.

    Thank you in advance.

    Andres

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • Chester Gillon
      Posted by Chester Gillon
      on May 07 2012 17:17 PM
      Mastermind6315 points

      Andres Aguirre
      But there is no reset happening as far as I can see.

      Can you set a breakpoint at the start of main. I have found that if an unexpected reset, e.g. a watchdog timeout, occurs when running under the debugger that the debugger doesn't seem to indicate that a reset occurs but instead just allows the program to continue as if no reset had occured. If there is a breakpoint at the start of main then stops there after an unexpected reset. The interrupt source flag(s) can then be read in the debugger to determine the cause of the unexpected reset.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Andres Aguirre
      Posted by Andres Aguirre
      on May 08 2012 09:37 AM
      Prodigy100 points

      Thank you for the idea, Chester.

      I tried it, but did not seem to work.

      I have two I2C chips I am talking to. I commented them out for now and it seems that I can run without problems (i.e. no resetting of DCOCTL). I do not know why or how this is the case. I will try to make some progress while I win some time to figure out what is crashing my system. Pleae let me know if you have other suggestions.

      Andres

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • old_cow_yellow
      Posted by old_cow_yellow
      on May 08 2012 11:35 AM
      Guru25715 points

      If your code did not do anything to the WDT, it will reset the chip.

      If you do not have a external pull-up resistor and a pull-down capacitor connected to the RST/NMI pin, EM noise may also trigger a reset.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • old_cow_yellow
      Posted by old_cow_yellow
      on May 08 2012 11:39 AM
      Guru25715 points

      Also, if you enabled interrupt (for example when you include I2C) but do not have an ISR to handle the interrupt, it will crash and may cause a reset.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Andres Aguirre
      Posted by Andres Aguirre
      on May 09 2012 07:47 AM
      Prodigy100 points

      Thank you for your suggestions.

      I will check the interrupts and perhaps add some dummy interrupt service routines. My problem seems to be related to the I2C, but I am not sure.

      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