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.

MSP430F5510 not always responding to BSL entry sequence via UART

Other Parts Discussed in Thread: MSP430F5510, MSP-EXP430F5529LP, MSP430F5529, MSP430F5329, MSP-TS430PN80A, MSP430G2553

In most cases the MSP430F5510 responds as expected when we try to enter BSL mode via BSL Scripter.  We are attempting to load code via the UART interface as there is no USB in this design.  We have occasionally encountered the case (i.e. a few boards out of hundreds we've built) where the BSL on the device does not respond and BSL Scripter returns an error.  We have monitored the RESET, TEST lines and see that the entry sequence looks correct.  Looking at the UART signals and see that the MSP430 is not ACKing the initial commands from the BSL Scripter.  BSL Scripter error codes are usually 0xee or 0x51.

We have found that this behavior is sensitive to the initial conditions - in particular how long the MSP430 was held in reset before we attempted to enter BSL mode.  If RESET is only low for a few seconds before initiating the BSL entry sequence, it works as intended, but if the RESET line has been held low for more than ~ 60 seconds then it will often fail.  We have also found that this behavior changes slightly depending on temperature and whether there is a voltage on the I/O pins pf the MSP430 (including the UART connections).

It appears maybe that the MSP430 is not always in an initialized condition when we are trying to enter BSL mode. 

Has anyone seen this behavior, or can suggest how we can guarantee an environment where the MSP430 enter the BSL every time?

  • Hi Joe,

    You say you are using UART BSL on the MSP430F5510. I wanted to ask to get a better picture - you loaded the UART version of the F55xx BSL from the SLAA450 download? www.ti.com/lit/pdf/slaa450 http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/CustomBSL/latest/index_FDS.html Did you use the txt file from SLAA450/5xx_6xx_Released_BSL_Images/MSP430F552x_F550x_Family/UART BSL? If so, what was the name of the file (the name is essentially the version number)?

    In addition, what hardware was this observed on - was it your own custom board, or can it be reproduced on a TI target board like the MSP-TS430RGC64USB, or MSP-EXP430F5529LP?

    Can you explain a little more about how the device is powered, and what you mean by "voltage on the I/O pins" - is there voltage on the I/O pins before there is voltage on Vcc?

    Regards,

    Katie

  • Katie,

    I didn't develop the software, but as I understand it we have modified it from the stock version possibly to support the initialization the particular peripherals we have attached. The design started more than 2 years ago, so it is likely that what we are using was not based on the latest version.

    The board is our own design.  We use almost all the I/O, including I2C, the one UART interface, ADC,  and a lot of bit-banging of digital I/O.  We do not use the USB capability.  It is powered from a ~ 3.3 supply.  All I/O is referenced to this rail.  No voltage is applied to the I/O pins when the power is not present, with the possible exception of the UART input ("UCA0SOMI").  When we changed it so that the RS-232 transceiver did not drive this pin when reset was low, the problem occurred a little less often, but did not disappear.

    Is there a particular situation with respect to the applied voltage on the I/O pins etc. that we should be especially careful to avoid?

    Thanks,

    Joe

  • Hi Joe,

    The reason I asked about voltages being applied to I/Os without any voltage present on Vcc, is that this will take the part out of spec:

    In the datasheet www.ti.com/lit/gpn/msp430f5510 please look at the section 5.1 "Absolute Maximum Ratings". There you will see that Voltage applied to any pin must not go above Vcc+0.3V. When you apply a voltage on a pin when Vcc is not connected, this can take the device outside of that rating. Stresses outside of the Absolute Maximum Ratings can cause the part to not work correctly (anything outside of Recommended Operating Conditions can do that), and they can also permanently damage the device or shorten its lifetime. Therefore, there should not be any voltage applied on the GPIOs when there's nothing on Vcc.  

    In addition, if you apply voltage on a GPIO without Vcc connected or with Vcc at a lower level, you can back power the device. The device may sort of start up, but of course is likely not going to really run correctly because of this incorrect state - and even once Vcc comes up later, the part may be in a weird state at this point. You can find other forum threads with similar situations.

    Since this GPIO condition is out of spec it must be avoided to ensure correct device operation, so this should be fixed whether it turns out to be your root cause or not (though it could be your root cause). Basically when there's no Vcc connected, there should be no voltage on any lines.

    For your present situation, since it sounds like you may not be using the stock UART BSL code that we provide but a modified version, it would be interesting to narrow it down to code vs hardware - our BSL Scripter is only tested with our own stock BSLs so maybe a different timing happens with your version or something. Do you have JTAG access to be able to reprogram the device? It would be a good test to use JTAG to load our UART BSL that I mentioned above for this device, and see if you can still reproduce the issue in that case. You may want to read out the BSL area first to preserve this information in case you need it later before running this test. You also should likely check if your custom BSL is using the same UART pins and everything as our stock one or not to see if this test is possible on your hardware.

    One other interesting case would be to do a "part swapping" test, where you take a passing and failing unit and swap the devices on them. Then you can see if the issue is following the device or the board.

    Regards,

    Katie

  • Katie,

    It is never the case that we are applying voltage to the part's pins without Vcc applied.  I understand the consequences of that. The only thing we might be doing is applying voltage to I/O pins while the reset pin is held low (with Vcc present).

    We will investigate trying the stock UART BSL code and will look for differences between it and our code.  (This decision pre-dates the current design team members, so this will take some digging.)  We do have access to JTAG in our development setup and can re-load the code easily. 

    Swapping the part is difficult since it is not socketed.  Since the board it is on is quite large, it exceeds the capacity of many SMT rework stations, possibly requiring removal by hand.  We will investigate this option.

    Thanks again for your reply.

    Joe T

  • Hi Joe,

    joe tarantino said:
    It is never the case that we are applying voltage to the part's pins without Vcc applied.  I understand the consequences of that. The only thing we might be doing is applying voltage to I/O pins while the reset pin is held low (with Vcc present).

    Thanks for clarifying that and sorry for the misunderstanding. I understand the failing conditions better now.

    In parallel with your investigation, I'll try to see if I can run a few tests here on an MSP430F5529 device that I have with RST pin held low for a long time before the BSL entry sequence, to see if I can also find any similar behavior.

    Regards,

    Katie

  • Hi Joe,

    I did some tests with the MSP430F5329 device with the stock UART BSL in it, and I could not get it to fail. Here's how I set up my test:

    1. I took the MSP-EXP430G2 Launchpad BSL host interface from this app note and modified it to hold RST low for ~60 seconds before sending the entry sequence. My code attached:

    lpad_bsl_int.c
    /* --COPYRIGHT--,BSD
     * Copyright (c) 2012, 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.
     * --/COPYRIGHT--*/
    /**************************************************************************//**
    *
    * @file     lpad_bsl_int.c
    *
    * @brief    implementation of MSP430 Launchpad based BSL interface
    *
    * @version  2.1.0
    *
    * @author   Leo Hendrawan
    *
    * @remark   the new MSP430 Launchpad BSL interface software is inspired by
    *           the BSL-Bridge implementation by OCY (old_cow_yellow)
    *           - thanks OCY! -
    *
    ******************************************************************************/
    
    //*****************************************************************************
    // Include section
    //*****************************************************************************
    
    #include <stdint.h>
    #include <stdbool.h>
    #include <msp430.h>
    
    
    //*****************************************************************************
    // Global variables
    //*****************************************************************************
    
    //*****************************************************************************
    // Macros (defines), data types, static variables
    //*****************************************************************************
    
    // pin definitions
    #define PC_TX_PIN          (BIT1) // P1.1
    #define PC_RX_PIN          (BIT2) // P1.2
    #define MSP_TX_PIN         (BIT7) // P1.7
    #define MSP_RX_PIN         (BIT6) // P1.6
    #define MSP_RST_PIN        (BIT4) // P1.4
    #define MSP_TEST_PIN       (BIT5) // P1.5
    #define MSP_TCK_PIN        (BIT0) // P1.0
    #define PB_PIN             (BIT3) // P1.3
    
    // clock setup delay
    #define CLK_SETUP_DLY()              __delay_cycles(100)
    
    // PB debouncing delay
    #define PB_DEBOUNCING_DLY()          __delay_cycles(400000)
    
    // BSL entry sequence delay
    #define BSL_ENTRY_SEQ_LONG_DLY()     __delay_cycles(200)
    #define BSL_ENTRY_SEQ_SHORT_DLY()    __delay_cycles(50)
    
    // vlo 1 ms counter variable
    uint16_t vlo_1ms_cnt = 0;
    
    // UART parity bit adding variables
    static bool add_parity = true;
    static uint16_t bit_8_cnt, bit_1_cnt, bit_1_5_cnt, bit_9_cnt;
    static uint16_t bit_cnt = 0, ones_cnt = 0;
    static bool start_bit = true;
    static uint8_t error = 0;
    
    //*****************************************************************************
    // Internal function declarations
    //*****************************************************************************
    
    static void calibrate_vlo(void);
    static void measure_baud_rate(void);
    static void delay(uint16_t delay_ms);
    static void trap(void);
    
    //*****************************************************************************
    // External functions
    //*****************************************************************************
    
    /**************************************************************************//**
    *
    * main
    *
    * @brief      main function
    *
    * @param      -
    *
    * @return     -
    *
    ******************************************************************************/
    void main(void)
    {
      // Stop WDT
      WDTCTL = WDTPW + WDTHOLD;
      // VLOCLK to source LFXT1S
      BCSCTL3 |= LFXT1S_2;
    
      // calibrate vlo
      calibrate_vlo();
    
      // set DCO to work between 8-14 MHz
      DCOCTL = 0x0000;
      BCSCTL1 = XT2OFF | (RSEL3 + RSEL2 + RSEL1);
      DCOCTL = (DCO1 + DCO0);
      
      // wait until clocks stabilize
      do
      {
        BCSCTL3 &= ~(XT2OF + LFXT1OF);
        IFG1 &= ~OFIFG;
        CLK_SETUP_DLY();
      } while(IFG1 & OFIFG);
    
      // initialize PC & MSP TX&RX pins
      P1DIR |= (MSP_TX_PIN + PC_TX_PIN);  // output pins, default high
      P1OUT |= (MSP_TX_PIN + PC_TX_PIN);
      P1DIR &= ~(MSP_RX_PIN + PC_RX_PIN); // input pins, pull-up enable
      P1REN |= (MSP_RX_PIN + PC_RX_PIN);
      P1OUT |= (MSP_RX_PIN + PC_RX_PIN);
    
      // initialize MSP RST, TEST, and TCK pins
      P1DIR |= MSP_RST_PIN + MSP_TEST_PIN + MSP_TCK_PIN;
      P1OUT &= ~(MSP_RST_PIN + MSP_TEST_PIN + MSP_TCK_PIN);
    
      // set push-button as input, pull-up enable
      P1DIR &= ~PB_PIN;
      P1REN |= PB_PIN;
      P1OUT |= PB_PIN;
    
      // delay for about 1s
      //delay(1000);
      unsigned char i = 0;
      for(i = 0; i<12; i++)
    	  delay(5000);
    
      // check if push button is pressed
      if(!(P1IN & PB_PIN))
      {
        PB_DEBOUNCING_DLY();
        if(!(P1IN & PB_PIN))
        {
          // sign for not adding parity bit
          add_parity = false;
    
          // give a red LED blink sign
          P1OUT |= MSP_TCK_PIN;
          delay(500);
          P1OUT &= ~MSP_TCK_PIN;
          delay(500);
        }
      }
    
      // set up TCK pin as indication of BSL Entry sequence generation
      P1OUT |= MSP_TCK_PIN;
    
      // generate the BSL entry sequence
      BSL_ENTRY_SEQ_LONG_DLY();
      P1OUT ^= (MSP_TEST_PIN + MSP_TCK_PIN);
      BSL_ENTRY_SEQ_LONG_DLY();
      P1OUT ^= (MSP_TEST_PIN + MSP_TCK_PIN);
      BSL_ENTRY_SEQ_SHORT_DLY();
      P1OUT ^= (MSP_TEST_PIN + MSP_TCK_PIN);
      BSL_ENTRY_SEQ_LONG_DLY();
      P1OUT |= MSP_RST_PIN;
      BSL_ENTRY_SEQ_LONG_DLY();
      P1OUT ^= (MSP_TEST_PIN + MSP_TCK_PIN);
    
      // check if BSL is invoked
      delay(100);
      if(!(P1IN & MSP_RX_PIN))
      {
    	// set error number
    	error = 1;
    
        // trap
        trap();
      }
    
      if(add_parity == true)
      {
        // run Timer_A in free running mode
        TACTL = TASSEL_2 + MC_2 + TACLR;
    
    	// if parity bit shall be added, measure baud rate
        measure_baud_rate();
      }
    
      // set GPIO interrupts
      P1IES |= (PC_RX_PIN + MSP_RX_PIN);
      P1IE |= (PC_RX_PIN + MSP_RX_PIN);
      P1IFG = 0;
    
      // ready to go, enable interrupt
      __enable_interrupt();
    
      while(1); // can also sleep here (but only to LPM0) zzzz...
    }
    
    //*****************************************************************************
    // Internal functions
    //*****************************************************************************
    
    /**************************************************************************//**
    *
    * calibrate_vlo
    *
    * @brief         calibrate vlo to get the 1ms counter tick
    *
    * @param         -
    *
    * @return        -
    *
    ******************************************************************************/
    static void calibrate_vlo(void)
    {
      uint16_t temp;
    
      // check DCO calibrated values
      if((CALDCO_1MHZ != 0xFFFF) && (CALBC1_1MHZ) != 0xFFFF)
      {
    	// set DCO with calibrated values
    	DCOCTL = CALDCO_1MHZ;
    	BCSCTL1 = XT2OFF | CALBC1_1MHZ;
    
        // wait until clocks stabilize
    	do
    	{
    	  BCSCTL3 &= ~(XT2OF + LFXT1OF);
    	  IFG1 &= ~OFIFG;
    	  CLK_SETUP_DLY();
    	} while(IFG1 & OFIFG);
    
    	// CCR0 works as capture with ACLK as input capture signal
    	TACCTL0 = CM_1 + CCIS_1 + SCS + CAP;
    
    	// set Timer_A to run in free-running mode and sourced from calibrated SMCLK
    	TACTL = TASSEL_2 + MC_2 + TACLR;
    
        // wait for first capture event
    	while(!(TACCTL0 & CCIFG));
    
    	// clear interrupt
    	TACCTL0 &= ~CCIFG;
    
    	// read CCR value
    	temp = TACCR0;
    
        // wait for second capture event
    	while(!(TACCTL0 & CCIFG));
    
    	// clear interrupt
    	TACCTL0 &= ~CCIFG;
    
    	// calculate 1 ms tick
    	temp = TACCR0 - temp;
    	vlo_1ms_cnt = 1000/temp;
    	if((1000 % temp) > temp/2)
    	{
    	  vlo_1ms_cnt++;
    	}
    
    	// stop timer
    	TACTL = 0;
      }
    }
    
    /**************************************************************************//**
    *
    * measure_baud_rate
    *
    * @brief         measure baud rate
    *
    * @param         -
    *
    * @return        -
    *
    ******************************************************************************/
    static void measure_baud_rate(void)
    {
      uint16_t temp;
    
      // measure bit time by waiting for the first 0x80 from PC
      // set PC_RX_PIN as capture interrupt
      P1SEL |= PC_RX_PIN;
      TACCTL1 = CM_2 + SCS + CAP; // set for capture on falling edge
    
      // wait until capture event occurs
      while(!(TACCTL1 & CCIFG));
      P1OUT &= ~MSP_TX_PIN;
    
      // clear the interrupt flag and take the CCR value
      TACCTL1 &= ~CCIFG;
      temp = TACCR1;
    
      // set PC_RX_PIN to capture the rising next edge of 0x80
      TACCTL1 = CM_1 + SCS + CAP;
    
      // wait until capture event occurs
      while(!(TACCTL1 & CCIFG));
      P1OUT |= MSP_TX_PIN;
    
      // switch off timer capture and calculate the bit time
      TACCTL1 = 0;
      bit_8_cnt = TACCR1 - temp;
      bit_1_cnt = bit_8_cnt >> 3;
      bit_1_5_cnt = (bit_8_cnt >> 4) + bit_1_cnt;
      bit_9_cnt = bit_8_cnt + bit_1_cnt + (bit_1_cnt >> 4);
    
      // set back PC_RX_PIN as GPIO
      P1SEL &= ~PC_RX_PIN;
    }
    
    /**************************************************************************//**
    *
    * delay
    *
    * @brief         a very rough delay using VLOCLK, only to be used during init
    *
    * @param         delay_ms    delay time in miliseconds
    *
    * @return        -
    *
    ******************************************************************************/
    static void delay(uint16_t delay_ms)
    {
      // set register
      TACCTL0 = 0;
      if(vlo_1ms_cnt == 0)
      {
    	// use typical VLO clock 12 kHz
    	TACCR0 = (12000/1000) * delay_ms;
      }
      else
      {
    	// use the calibrated value
    	TACCR0 =  vlo_1ms_cnt * delay_ms;
      }
    
      // start timer
      TACTL = TASSEL_1 + MC_1 + TACLR;
    
      // wait until flag is set
      while(!(TACCTL0 & CCIFG));
    
      // reset register
      TACTL = 0;
    }
    
    /**************************************************************************//**
    *
    * trap
    *
    * @brief         trap the whole system - assert like function
    *
    * @param         -
    *
    * @return        -
    *
    ******************************************************************************/
    static void trap(void)
    {
      uint16_t delay_blink;
    
      // disable interrupt
      __disable_interrupt();
    
      // set LED pins as output
      P1REN = 0;
      P1DIR = MSP_RX_PIN + MSP_TCK_PIN;
      P1OUT = MSP_RX_PIN;
    
      // set delay blink according to the error number
      delay_blink = 100 * error;
    
      while(1)
      {
        // blink, blink, blink till the end of time...
    	P1OUT ^= MSP_RX_PIN + MSP_TCK_PIN;
    	delay(delay_blink);
      }
    }
    
    /**************************************************************************//**
    *
    * Port1_Isr
    *
    * @brief         Port 1 interrupt
    *
    * @param         -
    *
    * @return        -
    *
    ******************************************************************************/
    #pragma vector=PORT1_VECTOR
    __interrupt void Port1_Isr(void)
    {
      // MSP_RX_PIN state change
      if(P1IFG & MSP_RX_PIN)
      {
        // change output pin
        P1OUT ^= PC_TX_PIN;
    
        // clear interrupt and change interrupt transition
        P1IFG &= ~MSP_RX_PIN;
        P1IES ^= MSP_RX_PIN;
      }
      // PC_RX_PIN state change
      else if(P1IFG & PC_RX_PIN)
      {
        // change output pin
        P1OUT ^= MSP_TX_PIN;
    
        // clear interrupt and change interrupt transition
        P1IFG &= ~PC_RX_PIN;
        P1IES ^= PC_RX_PIN;
    
        // activate timers if necessary
        if((add_parity == true) && (start_bit == true))
        {
          // toggle flag
          start_bit = false;
    
          // CCR0 is used for sampling the bits
          TACCR0 = TAR + bit_1_5_cnt;
          TACCTL0 = CCIE;
    
          // CCR1 is used to mark the end of the bits
          TACCR1 = TAR + bit_9_cnt;
          TACCTL1 = CCIE;
        }
      }
    }
    
    /**************************************************************************//**
    *
    * TimerA_Ccr0_Isr
    *
    * @brief         Timer_A CCR0 interrupt
    *
    * @param         -
    *
    * @return        -
    *
    ******************************************************************************/
    #pragma vector=TIMER0_A0_VECTOR
    __interrupt void TimerA_Ccr0_Isr(void)
    {
      // clear interrupt
      TACCTL0 &= ~CCIFG;
    
      // check if the ISR is actually valid
      if(add_parity == false)
      {
    	// set error variable
    	error = 2;
    
    	// trap CPU
    	trap();
      }
    
      // sample one bits
      if(P1IN & PC_RX_PIN)
      {
        ones_cnt++;
      }
    
      // check if already 8 bits sampled
      if(++bit_cnt < 8)
      {
        // re-trigger in 1 bit time
        TACCR0 = TAR + bit_1_cnt;
      }
    
      if(bit_cnt == 8)
      {
        // stop timer
        TACCTL0 = 0;
      }
    }
    
    /**************************************************************************//**
    *
    * TimerA_Vect_Isr
    *
    * @brief         Timer_A vector interrupt
    *
    * @param         -
    *
    * @return        -
    *
    ******************************************************************************/
    #pragma vector=TIMER0_A1_VECTOR
    __interrupt void TimerA_Vect_Isr(void)
    {
      static bool start_parity = true;
      bool reset = true;
    
      // check if the ISR is actually valid
      if(add_parity == false)
      {
    	// set error variable
    	error = 3;
    
    	// trap CPU
    	trap();
      }
    
      if(TAIV == 0x02)
      {
        // clear interrupt flag
        TACCTL1 &= ~CCIFG;
    
        if(start_parity == true)
        {
          // check the ones bit
          if(!(ones_cnt & 0x01))
          {
            // if 1s are even, set parity bit to 0
            P1OUT &= ~MSP_TX_PIN;
    
            // start timer
            TACCR1 = TAR + bit_1_cnt;
    
            // toggle flag
            start_parity = false;
    
            // do not reset
            reset = false;
          }
        }
        else
        {
          // toggle output after parity bit
          P1OUT |= MSP_TX_PIN;
    
          // toggle flag
          start_parity = true;
        }
    
        if(reset == true)
        {
          // reset counters
          bit_cnt = 0;
          ones_cnt = 0;
    
          // switch off CCR
          TACCTL1 = 0;
    
          // set flag for start bit
          start_bit = true;
        }
      }
    }
    
    /**************************************************************************//**
    *
    * Trap_Isr
    *
    * @brief         trap ISR for unwanted interrupt
    *
    * @param         -
    *
    * @return        -
    *
    ******************************************************************************/
    #pragma vector=NMI_VECTOR,ADC10_VECTOR,PORT2_VECTOR,WDT_VECTOR
    __interrupt void Trap_Isr(void)
    {
      // set error number
      error = 4;
    
      // trap CPU
      trap();
    }
    

    2. I connected the MSP-EXP430G2 Launchpad (with an MSP430G2553 device with the code linked above loaded in) to the MSP-TS430PN80A target board with an MSP430F5329 on it, per the connections shown in the app note www.ti.com/lit/pdf/slaa535 figure 5.

    When I plug in the MSP-EXP430G2 Launchpad (which is also powering the F5329 target), normally it would try to send the entry sequence after 1 second - at that point it toggles the LEDs if the entry sequence failed, or has the LEDs on solid if the entry sequence was successful (device entered BSL mode). The modification means that RST is held in reset for ~60s first, and then this happens. So I plug in the Launchpad, and wait 1 minute until the LEDs come on showing that I successfully entered BSL mode. At this point, I run the BSL scripter and am able to successfully program the part without error. I was not able to reproduce the issue with the TI default BSL and hardware.

    Did you see any different result when you tried to use the stock UART BSL that I mentioned above, on your hardware?

    Regards,

    Katie

  • Hi Joe,

    Were you able to make any progress on your issue? Is there anything further I can do to help?
    Regards,
    Katie
  • Katie,

    Have not yet been able to bring up the UART BSL yet, which prompts a question.  The code in the document you referenced is targeted to a different part.  We are using the 5510, so we'll have to change some device specific configuration.  Are there any examples for some of the older/smaller parts such as the 5510?

    In terms of other progress we've found that sometimes after erasing the flash memory for the application code (i.e. not the BSL segment) using the BSL scripter interface, the part doesn't communicate.  As I mentioned in the earlier post, this seems to be a function of temperature and time held in reset.  We're continuing to work that issue now.

    Joe

  • Hi Joe,

    Are you referring to the code linked from the SLAA450 app note www.ti.com/lit/pdf/slaa450? In that download, you can see that there is a folder 5xx_6xx_Released_BSL_Images / MSP430F552x_550x_Family. The F5510 is part of the F550x family, and it uses the same UART BSL as F5529 UART BSL - we use the same image for both (it is built for the smallest device variant). So looking in the folder 5xx_6xx_BSL_Source/MSP430F552x_TA_UART to get the source code for that, I think you should be able to essentially use the same project - the custom linker file included in the CONFIG folder already limits the BSL to be only in the BSL area, which is the same addresses on both parts. So to build for MSP430F5510, you can do this:

    Open MSP430F552x_TA_UART project in IAR.

    Project > Options > General Options, and set the Device to MSP430F5510

    In Linker options, set "Override default" and set it to "$PROJ_DIR$\CONFIG\lnk430_BSL_AREA_RAM_2400-33FF.xcl". That sets the code to build into only the BSL area.

    If you have a newer version of IAR, you may also need to modify the linker file in the CONFIG folder (we are still working to update the one in the SLAA450 download for newer versions of IAR that have a requirement for there to be a "CODE_I" segment): https://e2e.ti.com/support/microcontrollers/msp430/f/166/p/448987/1615271#1615271

    So in this case, take the lnk430_BSL_AREA_RAM_2400_3FFF.xcl and add the CODE_I and CODE_ID sections that you'll see in the lnk430f5510.xcl file - I did this for you attached: lnk430_BSL_AREA_RAM_2400-33FF.xcl

    And then you can also of course make any other changes you might want to the BSL (e.g. if you need to use different timers or pins or anything).

    Regards,

    Katie

  • Katie,

    2 items:
    1) In an earlier post you refer to using the MSP-TS430PN80A target board for your evaluations. We (only) have available several MSP-RS430RGC64USB. I grabbed the schematic etc. from document slau278v.pdf on the web page at (www.ti.com/.../msp-ts430rgc64usb) but it shows an earlier version of the PCB (1.1) vs. the 1.4 revision board that we have. Do you have a version of slau278v.pdf that shows the newest board?

    2) We've further narrowed down our issue:
    We built a very short BSL_SCRIPTER script that: sets the mode and baud rate; invokes the password; gets the BSL version.
    If we execute this in quick succession (waiting < 3 seconds between) it will validate the password successfully and enter BSL mode (as verified by both a successful return of the version string and by watching the packet ack on an oscilloscope). If we wait (while reset is still held low), say, 60 seconds, it will almost always fail, returning error code 0xEE or 0x51. Changing the temperature of the part alters the behavior where colder is worse (where worse means a larger range of time delays don't work).

    Our next step is to set the MSP-RS430RGC64USB up as closely as possible to our application and will repeat the above experiment to try to eliminate the hardware as a cause.

    Regards,

    Joe
  • Hi Joe,

    Looking in SLAU278 revision V, Figure B-45 on p. 105 shows the schematic for the MSP-TS430RGC64USB and is already marked as Rev. 1.4. Do you have Rev. 1.4, or are you looking for rev 1.1 (maybe the sentence was flipped around)?

    -Katie

  • At first I was confused by looking at the MSP-TS430RGC64B rather than the MSP-TS430RGC64USB (my bad). 

    However on looking a little deeper I still see a mismatch.  While the schematic on pg. 105 is for the 1.4 revision, just below it is a picture of a revision 1.3 PCB.

    But I have a 1.4 revision PCB, so I still think something in this doc is out of date.  Are there any differences between the 1.3 and 1.4 revision PCB?

    Thanks,

    Joe

  • Hi Joe,

    I'll ask about the layout being an older version, and if anything changed. Thanks for pointing that out.

    -Katie
  • Hi Joe,

    I talked to the team that designs the target boards. They said that the only difference between Rev. 1.3 currently shown in the SLAU278 and Rev. 1.4 is the footprint for the crystals Q1 and Q2. I've also filed a bug to get this updated in SLAU278 to show 1.4 and match the schematic version.

    Regards,
    Katie
  • Hi Joe,

    Any updates? Are you still having issues?

    -Katie

**Attention** This is a public forum