• 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 » MSP430F2618 - Error connecting to the target: Could not reset device
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

    MSP430F2618 - Error connecting to the target: Could not reset device

    This question is answered
    Greg Koehler
    Posted by Greg Koehler
    on May 08 2012 16:21 PM
    Prodigy30 points

    I have an msp430f2618 on a know working pcb.  This layout has been used many times before without any problems.  I've programmed this particular board multiple times, then one time I get an error message, "Software caused reset", or something like that, I can't remember it too well, and the debug session fails.  The next time and every time after that I get the message, "Error connecting to the target: Could not reset device".  I'm using CCSv5.1.0.09000 and an FET430UIF(updated for the current CCS version).  I've tried using a different FET(with updated software) and had the same problem.  Since the FETs were updated I have been able to program multiple MCUs. 

    This problem happened to the first board and I tried getting it to program again with no luck.  I was able to program a different board using a different project with each of the FETs.  When I went back to the broken board, it didn't matter the project, it still had the same error.  I created a new project and placed the "broken" code in it and it worked with no problem on a new board.  I programmed this new board through out the day and just now the same thing happened, "Error connecting to the target: Could not reset device".

    I put a meter on the reset pin.  It's pulled high through a 47k resistor to Vcc(3.3V) and reads 3.1V.  Leaving the probe on there and trying to program, I see the reset pin try to reset and goto 2.6V, then jump right back to 3.1V.  I've been looking around all day and haven't found any definitive answers.

    From my searching I have a few thoughts.

    Is the JTAG fuse blown?  I've never needed to blow one before and I'm not sure of the error message I'd see.

    Is there some really bad software on there that is causing a reset as soon as it's run and will never release the reset pin? If so, how can I erase the flash?

    Thanks,

    Greg

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • Jens-Michael Gross
      Posted by Jens-Michael Gross
      on May 09 2012 08:14 AM
      Verified Answer
      Verified by Greg Koehler
      Guru139900 points

      Greg Koehler
      It's pulled high through a 47k resistor to Vcc(3.3V) and reads 3.1V. 

      THis i sstrange. Unless your probe is low-impedance, RST should be on VCC, or else someone else is drawing from the pin.
      Greg Koehler
      I see the reset pin try to reset and goto 2.6V, then jump right back to 3.1V.
      This too looks like something is conencted to the pin, pulling it towards ~3V. So the FET cannot pull it low to reset the MSP.
      Normally, RST should go down to 0V if the FET attempts a reset.

      Greg Koehler
      Is the JTAG fuse blown? 

      It wouldn't affect the RST pin logical signals. And you should get a different error message (JTAG fuse blown) if it were. Also, you cannot accidentally blow a fuse on this chip. it requires a high-current overvoltage on the TEST pin to blow the fuse. (IIRC 7V/100mA for 10ms)

      Greg Koehler
      Is there some really bad software on there that is causing a reset as soon as it's run and will never release the reset pin?

      No need to release the reset pin. The RST pin is input only and cannto be held by software.
      However, there is indeed bad software that can cause an endless reset cycle. First, the software may cause a reset before the debugger/programmer can attach, which will ewer teh JTAG connection before it is completely established. A prominent example is a code that tries to disable the watchdog as first command but uses an incorrect value (password violation). A second known cause is that a software has been flashed that was meant for a different MSP. In case of some 2x family devices, the wrogn code will program the voltage supervisor isntead of the clock system, resulting in a votage-supervisor-reset that can only be overcome by a power cycle. Or by applying VCC to the external SVS sensor pin, so the SVS will release the MSP from reset.

      For these cases there are three possible solutions. First, lower the reaction time between reset and JTAg attach. This can be done by using a dedicated flashing software isntead of the (slower) IDE. Such as the Elprotronic tool.
      It may also help to restart the PC, so the USB devices will re-enumerate. USB has a large latency die to the stack. And the order in whcih devices are detected, removed, detected again makes a small difference which might be the improtant change.

      A second way is to build a hardware that keeps RST low after power-up until the an external reset signal is detected. This will prevent the malfuncitoning code to be executed as soon as power is applied.  Would work well for the SVS problem and in addition to the latency-reduction in teh first solution.

      Third way is to use the bootstrap loader feature (see BSL keyword in the forum and MSp docs). Since it is triggered by hardware, the application code won't execute after reset.  It does, however, not help in case of the SVS problem, unless you combine it with the RST-hardware above (to prevent code execution immediately after power-up). Using the BSL, you can erase the offending software (and even upload a new one).

      _____________________________________
      Before posting bug reports or ask for help, do at least quick scan over this article. It applies to any kind of problem reporting. On any forum. And/or look here.
      If you cannot discuss your problem in the public, feel free to start a private conversation: click on my name and then 'start conversation'. But please do so only if you really cannot do it in a public thread, as I usually read all threads. And I prefer to answer where others can profit from it (or contribute to it) too.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Greg Koehler
      Posted by Greg Koehler
      on May 09 2012 10:15 AM
      Prodigy30 points

      I was able to erase the flash using dedicated programming software ( I used  Elprotronic as suggested) and now CCS will work again.  I didn't realize how slow CCS is when programming.

      I was looking at the code that was causing the problems and it may be related to the size of the code.  I changed the printf support from full to minimal, which reduced the code size from 13772 bytes to 8032 bytes.  The problem seemed to go away. That code size was from the .text section.  Does the printf library with full support put code anywhere else besides the .text section?

       

      As a side note and not really important now, but I re-measured the reset line and I must have had a level shift on because the line measure 3.29V when pulled up and 2.9V when the it was trying to be pulled low. 

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Jens-Michael Gross
      Posted by Jens-Michael Gross
      on May 09 2012 11:50 AM
      Guru139900 points

      Greg Koehler
      I didn't realize how slow CCS is when programming.

      The problem is the command latency. It has to tunnel through all the USB protocol overhead and then through all the module layers in CCS, whcih is based on Eclipse and therefore modular but not too efficient.

      Greg Koehler
      Does the printf library with full support put code anywhere else besides the .text section?

      No, and I don't think it was related to the text size, but printf requires a large amount of stack space when interpreting the format string and producing the results. maybe you had a stack overflow or stack corruption, causing the processor doing nasty things that were punished with a reset.

      Greg Koehler
      2.9V when the it was trying to be pulled low

      It should go down to 0V. How did you measure? With a digital voltmeter? Those devices interpolate over a long time period (often in the range of 1/3s), so a short low pulse only appears as a small drop in voltage.
      2.9V will surely not cause a reset at all.
      Or you should check your pullup? maybe it is 470R instead of 47k. so the FET has no chance to pull it low.
      Normally, a reset is not required to attach JTAG an begin programming, It is just done to have the MSP in a defined state when doing so.
      But in case of a rampaging code, a reset is necessary, as it gives you the maximum time before the executed code will cause another reset on its own.

      _____________________________________
      Before posting bug reports or ask for help, do at least quick scan over this article. It applies to any kind of problem reporting. On any forum. And/or look here.
      If you cannot discuss your problem in the public, feel free to start a private conversation: click on my name and then 'start conversation'. But please do so only if you really cannot do it in a public thread, as I usually read all threads. And I prefer to answer where others can profit from it (or contribute to it) too.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Greg Koehler
      Posted by Greg Koehler
      on May 09 2012 14:02 PM
      Prodigy30 points

      You are right about the reset line, I was using a digital meter. Now that you mention the latency and interpolation, I don't know why I used a DMM instead of the o-scope sitting next to it on my desk.

       

      I've been digging most of the day into this and found one file that seems to cause the problem.  The  .cproject file has some differences between a working and non-working build.  I hastily was going through the compares to see what had changed and did not backup the broken .cproject file before overwriting it.  The once broken project now works.  I did notice that with the same source code in the two different projects produced 2 different sized out files.  The broken one being about 5k larger.  The .cproject file contains all the build settings and before I did a copy, I went through each property window in CCS project properties and compared the two projects.  They were the same, but the .cproject files were still different.

       

      Thanks for your help in bringing the msp's back to life.

       

      -Greg 

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Jens-Michael Gross
      Posted by Jens-Michael Gross
      on May 10 2012 08:12 AM
      Guru139900 points

      Greg Koehler
       I did notice that with the same source code in the two different projects produced 2 different sized out files.  The broken one being about 5k larger.

      Strange. It looks like there was a difference in the included runtime code, maybe caused by leftover entries from a different target processor. Perhaps the project was originally created for a different processor and/or for a different compiler version?

      Well, without the original bad project file, it's all plain guessing.

      The important thing is that you got it sorted out. Broken hardware is a bad thing, but even worse if you don't know what has broken it.

      _____________________________________
      Before posting bug reports or ask for help, do at least quick scan over this article. It applies to any kind of problem reporting. On any forum. And/or look here.
      If you cannot discuss your problem in the public, feel free to start a private conversation: click on my name and then 'start conversation'. But please do so only if you really cannot do it in a public thread, as I usually read all threads. And I prefer to answer where others can profit from it (or contribute to it) too.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Andreas Zoellner
      Posted by Andreas Zoellner
      on Mar 23 2013 15:43 PM
      Prodigy90 points

      I just had a very similar problem. My code seems to have an error that prevented the debugger from connecting to the device (tried CCS and IAR). I tried all I could find in this forum, what eventually worked for me was:

      1) Import and compile a simple example like the one in "\ccsv5\ccs_base\msp430\examples\example projects\msp430x2xx C Example" while generating binary-format files as described here: http://www.ti.com/lit/ug/slau157x/slau157x.pdf 

      2) Rename the output file msp430x2xx to msp430x2xx.txt and copy it to the MSP430Flasher folder (downloaded from http://processors.wiki.ti.com/index.php/MSP430_Flasher_-_Command_Line_Programmer)

      3) Use MSP430Flasher_1.2.1 to program the device over command line "MSP430Flasher.exe -n MSP430F2618 -w "msp430x2xx.txt" -v -z  [VCC] -e ERASE_ALL"

      After that step the simple LED blink code was running and I was able to connect with the debugger from CCS again. 

      MSp430Flasher
      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