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.

MSP430i2041 LPM2 + SBW debugging

After enter LPM2 mode debugger can't connect to MPU. Debugger - MSP-FET430UIF.

What am i doing wrong?
Thank you.

  • Hi user4366483,

     What kind of errors are you getting?? Could you please give us more information on the HW/board that you are using??  Also, which IDE are you using (CCS/IAR)??

    Could you please try the attached code and let us know if you get the same behavior (uses lpm3 by default).

    msp430i20xx_lpm3.c
    /* --COPYRIGHT--,BSD_EX
     * Copyright (c) 2013, Texas Instruments Incorporated
     * All rights reserved.
     *
     * Redistribution and use in source and binary forms, with or without
     * modification, are permitted provided that the following conditions
     * are met:
     *
     * *  Redistributions of source code must retain the above copyright
     *    notice, this list of conditions and the following disclaimer.
     *
     * *  Redistributions in binary form must reproduce the above copyright
     *    notice, this list of conditions and the following disclaimer in the
     *    documentation and/or other materials provided with the distribution.
     *
     * *  Neither the name of Texas Instruments Incorporated nor the names of
     *    its contributors may be used to endorse or promote products derived
     *    from this software without specific prior written permission.
     *
     * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
     * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
     * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
     * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
     * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
     * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
     * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     *
     *******************************************************************************
     * 
     *                       MSP430 CODE EXAMPLE DISCLAIMER
     *
     * MSP430 code examples are self-contained low-level programs that typically
     * demonstrate a single peripheral function or device feature in a highly
     * concise manner. For this the code may rely on the device's power-on default
     * register values and settings such as the clock configuration and care must
     * be taken when combining code from several examples to avoid potential side
     * effects. Also see www.ti.com/grace for a GUI- and www.ti.com/msp430ware
     * for an API functional library-approach to peripheral configuration.
     *
     * --/COPYRIGHT--*/
    //******************************************************************************
    //  MSP430i20xx Demo - Enters LPM3 with ACLK = 32kHz, SMCLK = MCLK = 1MHz
    //
    //  Description: This program operates MSP430 normally in LPM3, pulsing P1.4
    //   ~ 1 second intervals. WDT ISR used to blink LED. To measure LPM3 current
    //   on target board, remove JP1 and JP2 and measure current across JP1.
    //
    //  ACLK = 32kHz, MCLK = SMCLK = Calibrated DCO/16 = 1.024MHz
    //  * Ensure low_level_init.c is included when building/running this example *
    //
    //               MSP430i20xx
    //             -----------------
    //         /|\|                |
    //          | |                |
    //          --|RST             |
    //            |                |
    //            |            P1.4|-->LED
    //
    //  T. Witt
    //  Texas Instruments, Inc
    //  September 2013
    //  Built with Code Composer Studio v5.5
    //******************************************************************************
    #include "msp430.h"
    
    void main(void) {
        WDTCTL = WDT_ADLY_1000;             // WDT interval timer, ACLK
        IE1   |=  WDTIE;                    // Enable WDT interrupt
    
        // Configure GPIO
        P1OUT = 0x00;
        P1DIR = 0xFF;
        P2OUT = 0x00;
        P2DIR = 0xFF;
    
        // Configure SMCLK = MCLK = 1MHz
        CSCTL1 |=  DIVM__16 | DIVS__16;     // MCLK = DCO/16, SMCLK = DCO/16
    
        __bis_SR_register(LPM3_bits | GIE); // Enter LPM3, enable interrupts
    //    __bis_SR_register(LPM2_bits | GIE); // Enter LPM3, enable interrupts
        __no_operation();                   // For debugger
    }
    
    #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
    #pragma vector=WDT_VECTOR
    __interrupt void WDT_ISR(void) {
    #elif defined(__GNUC__)
    void __attribute__ ((interrupt(WDT_VECTOR))) WDT_ISR (void)
    #else
    #error Compiler not supported!
    #endif
        P1OUT ^= BIT4;                      // Toggle LED
    }
    

    Regards,

     David

  • IDE - IAR

    Error: 

    Tue May 26, 2015 13:56:18: Fatal error: Failed to initialize. Check if hardware is connected. Check if drivers are installed. Try to restart the computer. Tools using the parallel port are not supported on Windows Vista Session aborted!

    Code:

    #include  "msp430i2041.h"
    
    int main( void )
    {
      // Stop watchdog timer to prevent time out reset
      WDTCTL = WDTPW + WDTHOLD;
    
      LPM2;
      
      while(1);
    }

    Before I turn off board debugger connected is well.

    HW scheme:

    Thank you.

  • Hi!

    Please tell something about the connections you have used at the debug interface/FET - where is Vcc, RST/SBWTDIO and TEST/SBWTCK connected to?

    Dennis
  • A few remarks to the schematic;
    The Vcore capacitor of 100nF is far too small, must be at least 470nF.
    An electrolytic capacitor of 100uF at Vcc is not very sensible, much better is a 2.2-10uF tantalum. Both capacitors must be located very near the device Vcc pin.
    The JTAG signals at X3, both signals ‘RST’ and ‘SBWTCK’ must be isolated from each other. Best locate each of them on the outside of the connector/cable, this also reduces capacitance.

**Attention** This is a public forum