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.

MSP430F2410: BSLDemo always give synchronization error

Part Number: MSP430F2410

Hi , 

I am trying to perform SW upgrade through BSLDemo (http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPBSL_Scripter/latest/exports/BSLScripter-3.4.0-windows-installer.zip ) and FTDI cable (C232HD UART cable) , but always give me Synchronization Error. Below is my setup.

I have a 64-pin development target http://www.ti.com/tool/msp-fet430u64 


With the MSPFET debugger, I just load in a simple code LED into the board. 

int main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop WDT
if (CALBC1_8MHZ==0xFF) // If calibration constant erased
{
while(1); // do not load, trap CPU!!
}
DCOCTL = 0; // Select lowest DCOx and MODx settings
BCSCTL1 = CALBC1_8MHZ;
DCOCTL = CALDCO_8MHZ; // Load 8MHz constants

P1DIR |= BIT0;//output
P1OUT |= BIT0;

while(1);

}

After load in the application, disconnect the MSPFET debugger. 

I connect the BOOST pin with FTDI cable (C232HD UART cable)

Below is the connection from BOOST to FTDI cable

  1 (P1.1) to TXD

  3 (P2.2) to RXD

  5            to GND

  2 (RST)  to RTS# 

  4 (TCK)  to DTR#

  6             to VCC 

In the BDLDemo source code, Im following the DEPRECATED version that is supporting F2 family.

    I notice that  RST and TEST pin toggle are different. So i change to below:

/*-------------------------------------------------------------*/
void SetRSTpin(BOOL level)
/* Controls RST/NMI pin (0: GND; 1: VCC) */
{
  //if (level == TRUE)
  //  comDCB.fDtrControl = DTR_CONTROL_ENABLE;
  //else
  //  comDCB.fDtrControl = DTR_CONTROL_DISABLE;
  //(ORIG) comDCB.fDtrControl = level ? DTR_CONTROL_ENABLE : DTR_CONTROL_DISABLE;

	comDCB.fRtsControl = level ? RTS_CONTROL_DISABLE : RTS_CONTROL_ENABLE;

  SetCommState(hComPort, &comDCB);
} /* SetRSTpin */

void SetTESTpin(BOOL level)
/* Controls TEST pin (0: VCC; 1: GND) */
{
  //if (level == TRUE)
  //  comDCB.fRtsControl = RTS_CONTROL_ENABLE;
  //else
  //  comDCB.fRtsControl = RTS_CONTROL_DISABLE;

	//(ORIG) comDCB.fRtsControl = level ? RTS_CONTROL_ENABLE : RTS_CONTROL_DISABLE;

	comDCB.fDtrControl = level ? DTR_CONTROL_DISABLE : DTR_CONTROL_ENABLE;

  SetCommState(hComPort, &comDCB);
} /* SetTESTpin */

/*-------------------------------------------------------------*/
void bslReset(BOOL invokeBSL)
/* Applies BSL entry sequence on RST/NMI and TEST/VPP pins
 * Parameters: invokeBSL = TRUE:  complete sequence
 *             invokeBSL = FALSE: only RST/NMI pin accessed
 *
 * RST is inverted twice on boot loader hardware
 * TEST is inverted (only once)
 * Need positive voltage on DTR, RTS for power-supply of hardware
 */
{
  /* To charge capacitor on boot loader hardware: */
  SetRSTpin(1); 
  SetTESTpin(1);
  delay(250);

  if (invokeBSL)
  {
    SetRSTpin(0);    /* RST  pin: GND */
    SetTESTpin(1); /* TEST pin: GND */   delay(10);   /* delays added to meet also */
    SetTESTpin(0); /* TEST pin: Vcc */   delay(10);   /* critical layout and/or    */
    SetTESTpin(1); /* TEST pin: GND */   delay(10);   /* dimensioning problems     */
    SetTESTpin(0); /* TEST pin: Vcc */   delay(10);   /* (poked by MK)             */
    SetRSTpin (1); /* RST  pin: Vcc */   delay(10);
    SetTESTpin(1); /* TEST pin: GND */
	printf("BSL Reset\n");
  }
  else
  {  
    SetRSTpin(0);    /* RST  pin: GND */
    delay(10);       /* delays */
    SetRSTpin(1);    /* RST  pin: Vcc */
  }
  /* Give MSP430's oscillator time to stabilize: */
  delay(250); 

  /* Clear buffers: */
  PurgeComm(hComPort, PURGE_TXCLEAR);
  PurgeComm(hComPort, PURGE_RXCLEAR); 
} /* bslReset */

I used Digital multimeter to check out the voltage of RST pin and TCK pin

When set to 

SetRSTpin(1), then it is 3.3 Volt
SetRSTpin(0), then is 0 Volt
SetTESTpin(1), then is 3.3 Volt 
SetTESTpin(0), then is 0 Volt.


Am i missing something else? 

I also try out post https://e2e.ti.com/support/microcontrollers/msp430/f/166/t/246553?BSL-sYNCHRONIZATION-ERROR 

To change the pin from MCU to UART 

  1 (P1.1) to RXD

  3 (P2.2) to TXD

I also try out post  https://e2e.ti.com/support/microcontrollers/msp430/f/166/t/160989

This post is to revert the LEVEL on the RST and TEST... 

Nevertheless, 

with setting below  and change the LEVEL=!LEVEL 

  1 (P1.1) to RXD

  3 (P2.2) to TXD

  5            to GND

  2 (RST)  to DTR# 

  4 (TCK)  to RTS#

  6             to VCC 

I think i have entered the BSL mode. 


After the  BSLReset(1) , the LED is not turned on. Means it is not running at the application. 

After the BSLReset(0), then LED will only be turned on. This means application run as normal. 

I still have no luck. 

Need helps... 

Appreciate

  • First, I believe you have DTR and RTS connected backward.  DTR at the FTDI should go to the processor's /Reset pin.  The RTS output from the FTDI should go to the Test or TCK pin.

    In addition, the problem usually encounted with USB-to-serial adapters like the FTDI is that the polarity of DTR and/or RTS is the opposite of what's needed for the triggering pattern that intitiates BSL in the chip.  I recompiled a version of BSLDEMO which has two additional options.  The -i option reverses the polarity of DTR.  The -j option reverses the polarity of RTS.  You might try all four permutations of these options to see if one of them will work for you.

    https://github.com/gbhug5a/MSP430-BSL/tree/master/BSLDEMO-2.01c

  • Yes.

    I have tried, but still the same. 

    I change the level (in fact i change it in using LEVEL=!LEVEL ) 

    also using different combination of -i and -j 

    -i -j  or just -i or -j

    I checked my configuration from FTDI ->MCU is as how you have described.  

    DTR (Grey) - >  4(RST )

    RST (Green)- >  2 TCK

    TXD (Orange) -> 3 (RX )

    RXD (Yellow) -> 1 (TX)

    GND black -> 5

    VCC Red -> 6 

    In the MCU software, do we need to prepare anything? Any clock or pin needs to be set ? 

    Really need helps :( 
    Appreciate it a lot. 

  • I don't know what else to suggest.  Perhaps one of the TI people will have a solution for you.

  • I think you may need to post your issue again in a new thread to get someone from TI to take notice.

    If you have access to an oscilloscope, it may help isolate where the problem is if you can connect the scope's two channels to the DTR and RTS outputs of the FTDI cable.  Then trigger on RTS and see if you get the same pattern shown in Section 1.3.2 (Figure 3) of SLAU319.  BSLDEMO will generate the pattern even if nothing is connected.  That will at least confirm that the pattern is being generated, with correct polarity on DTR and RTS.  If it still doesn't work, then it must be an issue with your developpment board - perhaps a jumper of some kind that needs to be set.

    Also be sure your COM port is set to 8E1.  Even parity.

  • Hi George,
    thanks for highlighting this, no need for a new post, it just took us a bit to dig into the issue.

    Tan,
    it seems that the issue occurs because the BSL is not invoked correctly using BSL DEMO.
    We are trying to reproduce this error in order to figure out a solution.

    Please stay tuned for suggestions from our side.
    Thanks for your patience and best regards,
    Britta
  • Tan,

    just a quick update on timlines: I expect a solution or workaround to your issue during the next week.
    I hope this timeline is fine for you, we have or experts looking into this topic.

    Thanks for the understanding and best regards,
    Britta
  • Hi Britta,

    Thanks for your update. Deeply appreciate your help.
    Will you look into similar hardware set up that I have ?
    Or something else?

    Regards,
    Tan
  • Hi all, 

    I found solution. 

    The main issue is the  64-pin development target http://www.ti.com/tool/msp-fet430u64  TX Pin 1 and RX Pin 2 that are connecting to P1.1 and P2.2 are bridged with 2 resisters (R6) and (R7).

    These two pins has resistance. 

    I notice the signal can't pass through the resistance.

    Therefore I wired the cable directly to P1.1 and P2.2 without through the registers R6 and R7 , to the UART cables. 

    That solved my problems ! 
    Viola 

    Below is my connections for the rest of to learn 

      1 (P1.1) to RXD

      3 (P2.2) to TXD

      5            to GND

      2 (RST)  to DTR# 

      4 (TCK)  to RTS#

      6             to VCC 

    Be mind that you should use George Hug Solution where to invert DTR and RTS 

    https://github.com/gbhug5a/MSP430-BSL/tree/master/BSLDEMO-2.01c

    Overall, I want to thanks for all the helps that are given above. 

    Million thanks. The path of finding solution is not easy and I appreciate all the helps. 

    Thank you again. 

  • Tan Han Lun said:

    Be mind that you should use George Hug Solution where to invert DTR and RTS 

    https://github.com/gbhug5a/MSP430-BSL/tree/master/BSLDEMO-2.01c

    Congratulations on finding a solution.  Did you invert both DTR and RTS?  So both -i and -j options?

  • Yeap. I inverted both signal :) 

**Attention** This is a public forum