This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP-FET430UIF: MSP-FET430UIF tool trashes MSP430F2013 internal flash

Part Number: MSP-FET430UIF

I reported an issue where CCS was unable to detect my MSP-FET430UIF and although I followed the recommendations which were given to me by TI support, I could not resolve this.

I am currently using MSP-FET430UIF together with a MSP430F4618 Experimenter board.

I am using an Ubuntu 19.10 laptop with the latest msp-elf-gcc toolchain (8.3.0.16)

After jumping through a number of hoops, I managed to get everything running correctly, using mspdebug and am now in the process of trying to configure my own custom Emacs-based IDE, with a bunch of packages, since CCS is a no-go for me and caused my laptop to crash.

I am now faced with an extremely ugly situation, whereby, it has become apparent to me that the MSP-FET430UIF tool has somehow damaged the bootstrap loader in the MSP430F2013 on the experimenter board.

I have read a number of articles regarding similar issues, in which it appears that the security fuse has blown, however, it is a matter of a mass erase of the on-chip flash being necessary.

Since the MSP430F2013 does not have a serial UART, the recommend methods of connecting a special circuit and correcting this issue, is not possible.

As a result, I decided to switch to a second, identical, brand-new MSP430F4618 Experimenter board.

Since my objective, at this stage, has only been to get my toolchain and debug environment working reliably, I have only used a simple blink.c to do my testing with:

#include <msp430x20x3.h>

int main(void) {
    WDTCTL = WDTPW | WDTHOLD;        // Stop watchdog timer
    P1DIR |= 0x01;                    // Set P1.0 to output direction

    for(;;) {
        volatile unsigned int i;    // volatile to prevent optimization

        P1OUT ^= 0x01;                // Toggle P1.0 using exclusive-OR

        i = 10000;                    // SW Delay
        do i--;
        while(i != 0);
    }

    return 0;
}

I was doing some testing, using MSPDEBUG as stub, and connecting GDB.

After a number of tests, setting breakpoints, running and just getting used to the commands and options, I noticed that, every time I loaded the blink.out and ran it, it looked like a breakpoint was set and was halting. I finally rebooted my laptop and power-cycled the board, to find that that the same thing has happened to my second experimenter board.

It is clearly evident to me that the damage has been done by some marginal timing issue, in relation to using the MSP-FET430UIF JTAG together the Spy-bi-Wire interface on the MSP430F2013.

The MSP-FET430UIF tool is revision 1.4a.

I would like to ask TI to please send me a replacement FET tool and two experimenter boards, which work reliably.

Thanking you in advance.

Jonathan Roberts

  • Hi Jonathan,

    I'm really sorry you are having so much trouble with the tool. Let me do a little research and get back to you with a solution.

  • Hi Dennis,

    Thank you for getting back to me.

    I look forward to your response to a resolution to this issue.

    Thanks and Regards,

    Jonathan

  • Hi Jonathan,

    Apologize for the delay in responding.  It took me a while to track down that experimenter board.

    As a point of reference, I was able to program and debug the code snippet you provided using CCS on my board.

    So my first question would be after you load your blink.out you indicate that the code appears to halt (ie LED stops blinking).

    Is this with or without the debugger attached?  If attached, have you tried removing the debugger and powering the board with external supply and see if same issue?

    The reason I ask this is if the JTAG fuse were blown on this device, the MSP-FET won't be able to program the device and will provide an error message or return code indicating the programming was not successful.  It sounds like you are still able to program the device.

  • Hi Dennis,

    Thanks for getting back to me and for confirming that you can load the code onto your board.

    In answer to your question, the LED stops blinking completely, even if powered by an external supply.

    So yes, you are right, it does appear that I am able to program the MSP430F2013.

    Since we started this discussion, I became concerned that there was something wrong with the compiler or configuration, and decided to do a test using the TI Cloud Tools.

    I generated a blink.hex file using the TI Compiler and loaded it using mspdebug. The following is the response:

    ============================================================================================

    MSPDebug version 0.25 - debugging tool for MSP430 MCUs
    Copyright (C) 2009-2017 Daniel Beer <dlbeer@gmail.com>
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    Chip info database from MSP430.dll v3.13.0.601 Copyright (C) 2013 TI, Inc.

    Trying to open /dev/ttyUSB1 at 460800 bps...
    Initializing FET...
    FET protocol version is 20408002
    Set Vcc: 3000 mV
    Configured for Spy-Bi-Wire
    Device ID: 0xf201
      Code start address: 0xf800
      Code size         : 2048 byte = 2 kb
      RAM  start address: 0x200
      RAM  end   address: 0x27f
      RAM  size         : 128 byte = 0 kb
    Device: MSP430F20x3
    Number of breakpoints: 2
    fet: FET returned NAK
    warning: device does not support power profiling
    Chip ID data:
      ver_id:         01f2
      ver_sub_id:     0000
      revision:       30
      fab:            40
      self:           0000
      config:         03
      fuses:          00
    Device: MSP430F20x3

    Available commands:
        !               fill            power           setwatch_r      
        =               gdb             prog            setwatch_w      
        alias           help            read            simio           
        blow_jtag_fuse  hexout          regs            step            
        break           isearch         reset           sym             
        cgraph          load            run             verify          
        delbreak        load_raw        save_raw        verify_raw      
        dis             md              set             
        erase           mw              setbreak        
        exit            opt             setwatch        

    Available options:
        color                       gdb_loop                    
        enable_bsl_access           gdbc_xfer_size              
        enable_fuse_blow            iradix                      
        enable_locked_flash_access  lowercase_dis               
        fet_block_size              quiet                       
        gdb_default_port            

    Type "help <topic>" for more information.
    Use the "opt" command ("help opt") to set options.
    Press Ctrl+D to quit.

    (mspdebug) load blink.hex
    Writing   72 bytes at f800...
    Writing    8 bytes at ffe4...
    Writing    6 bytes at fff0...
    Writing    4 bytes at fffc...
    Done, 90 bytes total
    (mspdebug) run
    Running. Press Ctrl+C to interrupt...
        ( PC: 0f800)  ( R4: 07f22)  ( R8: 033aa)  (R12: 0f3a7)  
        ( SP: 009c1)  ( R5: 0709e)  ( R9: 0d2bb)  (R13: 043f7)  
        ( SR: 00000)  ( R6: 0f3fb)  (R10: 0474a)  (R14: 07b77)  
        ( R3: 00000)  ( R7: 0ed94)  (R11: 0773f)  (R15: 0c72e)  
    0xf800:
        0f800: 00 00                     BRA     @PC
        0f802: 00 00                     BRA     @PC
        0f804: 20 00 00 00               BRA     &0x0000
        0f808: 00 00                     BRA     @PC
        0f80a: 00 00                     BRA     @PC
        0f80c: 00 00                     BRA     @PC
        0f80e: 20 00                     
    (mspdebug)

    ============================================================================================

    So, as you can see, it is loading the code, but halts immediately when I enter the  run command.

    I have been trying all sorts of things to get to the bottom of this and am now trying to get the MSPFlasher running under Ubuntu.

    I managed to compile it from source, after messing around with the Makefile, and defining a LD_RUN_PATH environment variable, to point to the libmsp430.so library file.

    The problem I am finding, however, with MSPFlasher and the CCS tools and also the Cloud Tools, is that none of these are able to detect my MSP-FET430UIF tool, whereas mspdebug finds it and works correctly.

    Just a short while ago, after getting MSPFlasher running, when I tried it using various different "triggers" it simply cannot detect the FET tool, and comes back with:

    ============================================================================================

    jona@bimbo:~/ti/msp430/boards/msp-exp430fg4618/2013-test$ msp430-flasher -i DETECT
    * -----/|-------------------------------------------------------------------- *
    *     / |__                                                                   *
    *    /_   /   MSP Flasher v1.3.20                                             *
    *      | /                                                                    *
    * -----|/-------------------------------------------------------------------- *
    *
    * Evaluating triggers...done
    * Executing FET detection sweep:
    * Couldn't find any connected USB FETs!
    * Powering down...done
    * Disconnecting from device...done
    *
    * ----------------------------------------------------------------------------
    * Driver      : closed (MSP DebugStack not initialized)
    * ----------------------------------------------------------------------------
    */
    jona@bimbo:~/ti/msp430/boards/msp-exp430fg4618/2013-test$
    ============================================================================================

    I don't understand these messages, because I don't understand how it can come back with:

    * Powering down...done
    * Disconnecting from device...done

    if it has just responded:

    * Couldn't find any connected USB FETs!

    ============================================================================================

    This has made me sceptical about the quality of the code used to write this tool.

    Although this is becoming a good learning experience for me, on a number of facets, I am not making any headway with programming the MSP430.

    I appreciate your ongoing help and support.

    Best Regards,

    Jonathan

  • this topic has been resolved in the following thread:

**Attention** This is a public forum