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