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.

MSP430F5438 BSL Problems using BSL_Scripter

Other Parts Discussed in Thread: MAX202, MSP430F5438

 

Folks,
Would someone who has used this BSL please take a look at the input and output data below and see if they know what might be wrong?
I've also asked TI, but so far, they're not much help...
The main problem is that if I make the file LittleFile2.

txt, which is a subset of the TI.txt file for out main program, much larger, the RX_DATA_BUFFER fails. This must be overcome if I am to use this to upload new firmware. Also, I call ERASE_CHECK 5C00 200 after mass erase just before the write, and again after the write, and it says "Passed" both times even though the block is not erased the second time.
Thank you for taking the time to look at this,
Mike Raines

Script file:

MODE 5438 COM4
VERBOSE
CHANGE_BAUD_RATE 57600
MASS_ERASE
ERASE_CHECK 5C00 200
RX_PASSWORD defaultPassword.txt
TX_BSL_VERSION
TX_BUFFER_SIZE
RX_DATA_BLOCK Little_File2.txt
ERASE_CHECK 5C00 200
TX_DATA_BLOCK 5C00 80 readback.txt

defaultPassword.txt:
@FFF0
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
q

LittleFile2.txt:
@5C00
31 40 00 5C B1 13 EA A8 0C 93 14 24 3C 40 9E 22
3D 40 B1 0D B1 13 18 A5 3C 40 00 1C 3D 40 CA 92
3E 40 9E 06 B1 13 7C A9 8C 00 68 99 8D 00 6C 99
B1 13 34 9D B0 13 BA BD B1 13 78 A9 92 42 20 07
BC 2B 92 42 2A 07 B0 2B 92 42 22 07 B2 2B 92 42
00 00
q


outfile.txt:

------------------------------------------
BSL Scripting application 1.02
The local time is: 14:45 on 22.04.2010
------------------------------------------
Initializing, Mode: 5438  COM: COM4    DONE
Verbose mode on
Changing Baud Rate to 57600       
-------------------------------------------------
[80] [02] [00] [52] [05] [77] [25] {00}
-------------------------------------------------
DONE
Mass Erase:               
-------------------------------------------------
[80] [01] [00] [15] [64] [a3] {00}
-------------------------------------------------

-------------------------------------------------
{80} {02} {00} {3b} {00} {60} {c4}
-------------------------------------------------
DONE
Checking 0512 bytes starting at 5c00 for erase:        PASSED
RX Password:               
-------------------------------------------------
[80] [11] [00] [11] [ff] [ff] [ff] [ff] [ff] [ff] [ff] [ff] [ff] [ff] [ff] [ff] [ff] [ff] [ff] [ff] [4e] [c9] {00}
-------------------------------------------------

-------------------------------------------------
{80} {02} {00} {3b} {00} {60} {c4}
-------------------------------------------------
DONE

-------------------------------------------------
[80] [01] [00] [19] [e8] [62] {00}
-------------------------------------------------

-------------------------------------------------
{80} {05} {00} {3a} {00} {01} {01} {01} {6c} {4f}
-------------------------------------------------
BSL Version:                Vendor:[TI],CI:[01],API:[01],PI:[01]

-------------------------------------------------
[80] [01] [00] [1a] [8b] [52] {00}
-------------------------------------------------

-------------------------------------------------
{80} {03} {00} {3a} {04} {01} {1d} {12}
-------------------------------------------------
Getting Buffer Size:            [260]
Writing Little_File2.txt to device:   
-------------------------------------------------
[80] [56] [00] [10] [00] [5c] [00] [31] [40] [00] [5c] [b1] [13] [ea] [a8] [0c] [93] [14] [24] [3c] [40] [9e] [22] [3d] [40] [b1] [0d] [b1] [13] [18] [a5] [3c] [40] [00] [1c] [3d] [40] [ca] [92] [3e] [40] [9e] [06] [b1] [13] [7c] [a9] [8c] [00] [68] [99] [8d] [00] [6c] [99] [b1] [13] [34] [9d] [b0] [13] [ba] [bd] [b1] [13] [78] [a9] [92] [42] [20] [07] [bc] [2b] [92] [42] [2a] [07] [b0] [2b] [92] [42] [22] [07] [b2] [2b] [92] [42] [00] [00] [68] [26] {00}
-------------------------------------------------

-------------------------------------------------
{80} {02} {00} {3b} {00} {60} {c4}
-------------------------------------------------
DONE
Checking 0512 bytes starting at 5c00 for erase:        PASSED
Reading 0128 bytes starting at 5c00 to file readback.txt:       
-------------------------------------------------
[80] [06] [00] [18] [00] [5c] [00] [80] [00] [47] [38] {00}
-------------------------------------------------

-------------------------------------------------
{80} {81} {00} {3a} {31} {40} {00} {5c} {b1} {13} {ea} {a8} {0c} {93} {14} {24} {3c} {40} {9e} {22} {3d} {40} {b1} {0d} {b1} {13} {18} {a5} {3c} {40} {00} {1c} {3d} {40} {ca} {92} {3e} {40} {9e} {06} {b1} {13} {7c} {a9} {8c} {00} {68} {99} {8d} {00} {6c} {99} {b1} {13} {34} {9d} {b0} {13} {ba} {bd} {b1} {13} {78} {a9} {92} {42} {20} {07} {bc} {2b} {92} {42} {2a} {07} {b0} {2b} {92} {42} {22} {07} {b2} {2b} {92} {42} {00} {00} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {ff} {59} {cb}
-------------------------------------------------
DONE

  • Today I have further determined that, with our release version of software installed on the F5438 chip, I am able to invoke the BSL, supply the password, and read out 64k using the TX_DATA_BLOCK command.  It seems to me that this means there is nothing wrong with the serial interface.  It seems that since I can have the BSL send lots of data read from the chip, but can only write small amounts (80 bytes or so) before the BSL fails, there is something wrong with the factory BSL or the flash write capabilities.  What do you all think? 

     

    Thanks for taking the time to look,

    Mike Raines

     

    script file used to read from chip:

    MODE 5438 COM4
    VERBOSE
    RX_PASSWORD Password042310.txt
    TX_BSL_VERSION
    TX_BUFFER_SIZE
    TX_DATA_BLOCK 5C00 10000 readback.txt

  • Mike,

    I did some bench test on my end and I couldn't reproduce the failure here.

    Are you using an experimental silicon where there is a XMS marking on the chip?

    What is the VCC voltage during programming?

    If you do a repeated segment erase and write the file again, does it throw the same error?

    Basically try this

    MODE 5438 COM4
    VERBOSE
    RX_PASSWORD Password042310.txt
    TX_BSL_VERSION

    MASS_ERASE

    RX_DATA_BLOCK BigFile.txt

    SEGMENT_ERASE 0x5c00

    RX_DATA_BLOCK BigFile.txt

    Regards,

    William

  • William,

         Thanks for the response.  Before I was able to try your suggestions, working with our hardware guys, we determined that our problem is some of the hardware in our implementation of slau265g chapter 5.  Following this entry is a description of the hardware problems from our hardware guy, JJ.  Please see if you can help him.

         The only thing I need now, software wise, are the following files necessary to compile the BSL_Scripter source code for usb use:

     

     

    hid.lib, hidparse.lib, and hidclass.lib?  I found those names as .sys files, but that didn’t help.

          I cannot find these files anywhere...

     

    Thanks for your help,

    Mike Raines

  • William,

         Here is the email from JJ concerning the BSL hardware interface problems:

     

      Today we discovered the source of our problems.  Prior to running the script to invoke the BSL, there is a negative bias on C5.  When writing large blocks of data, we see the cap discharging and eventually begin to go positive for a few hundred mS.  When this occurs, our Vcc levels shift from 3V to around 4V, as does the logic level signals.  We have found that it is at this point that the program quits writing data.  We have been able to delay this event and write more data by increasing the capacitance of C5, but still not to the point we can successfully write the entire file.   The only way we are able to successfully write the entire data file is by referencing the op-amp (IC3) ground to circuit ground instead of C5.  Our concern with this approach is that we lose our negative bias on the TX line.  Any ideas or comments?
     
      Also, Chapter 7 of document SLAU265G discusses PCB layout suggestion and illustrates this with a PCB designated as MSP-BOOTS430IF  REV:1.1.  Is this board available from TI so that we can perform further testing?
     
    Best Regards,
    JJ Jernigan
    Hoffer Flow Controls, Inc.

  • That sounds strange.
    I don't know what C5 is (a capacitor of course, but where and what for) and why it must have a negative bias. And why the TX line requires a negative bias. Or what the OpAmp has to do with it.

    Fact is that while erasing (2mA), and even more when writing (3-5mA), the supply current for the MSP significantly raises. Why this causes a raise of VCC and other side-effects, depends on the hardware which I don't know. (and I doubt you'll give away the drawings, but if you do, I can take a look at it).

    The Flash controller operating voltage range is 1.8..3.6V If voltage. But while programming,VCC MUST remain stable at its current level. From the users guide:
    "If DVCC changed significantly during programming, this bit [VPE] is set to indicate an invalid result." It is not listed what a 'significant change' is, but I'd guess raising from 3V to 4V definitely is.

  • Jens_Michael,

         Thanks for taking a look.  The circuit is in TI slau265 rev g, chapter 5, figure 5-1, labeled Bootstrap Loader Interface Schematic.

    Thanks,

    Mike Raines

  • The guide has reached revision H, mine was F (only 6 weeks old!).

    Hmmm, a really complex circuit. It has the advantage of powering the MSP from PC port, but usually, the MSP already has a power supply of some sort, and if the MSPs supply is for less than 3V, it will interfere or even short-circuit the 3V from the interface.

    For this reason, I usually supply my RS232 interfaces from the MSP side. For normal RS232, I simply use a MAX202 chip and 4 capacitors. That's all. No OpAmps, no inverters. For a BSL interface, a MAX238 would be required (because of the 3rd incoming line). Or, (if there's no 5V supply available) one of the 3V derivates of this series. The only thing that's left are the two inverters required for TCK and RST. A simple transistor will do, if the PC software cannot be changed to simply invert their output signals.

    But aside from the (imho) unnecessary complexity, I don't see why VCC should rise at all. Except if there's something wrong with your incarnation of the interface.

    The low-drop regiulator is more or less a self-adjusting resistor. It will just limit the current flowing from in to out so that the output voltage will stay at the desired level. If the output voltage raises for some reason, it cannot lower it by drawing current to GND. It will just reduce the current flow from in to out to zero. Which does not actually lower the output voltage, just does not add more.

    So why does VCC rise? This happens if a higher current flows into VCC than is drawn by the active components (MSP), or if current flows from GND to a more negative value. But why should it happen? The only possible way is through the input pins of the MSP. These have clamp diodes which allow any excess voltage above VCC or below GND on the input pins to be short.cut to VCC or GND. So if the input pin of the MSP is treated with a voltage above VCC, current will flow from the input pin to VCC. And when this current exceeds the current consumption of the other components powered by VCC (including the MSP itself), VCC starts to rise.

    But where should this voltage come from? There are only three devices connected with the MSP.

    1) IC1. It seems to be working correctly, as it keeps the 3V level under standby conditions.

    2) D2. its purpose is bypassing any VCC_IN (external supply) >3V to the input of the voltage regulator and (more important) to the supply of the OpAmp. If it's defective, either the interface will (diode open) continue working with 3V instead of the higher VCC (e.g. 3.6V)  or (diode short-cut) bypass the voltage regulator and cause the OpAmp powering the 74AHC14 with the higher input voltage on IC1 IN instead of VCC.

    3) IC2. If it is powered by a voltage >Vcc, it will also output a voltage >VCC to the MSP input pins, causing excess current flowing into VCC. This can be cause by either a short-cut of D2 (see above) or a bad soldering on pin 2 of IC3 (causing the OpAmp to latch-up and powering IC2 with its full supply voltage instead of VCC ro VCC_IN (whatever is higher). Also, using a 74HCT14 (or even worse a standard TTL 74(LS)14) instead of the 74AHC14 might cause excess current from the input pins into the outputs or the supply.

    My suggestion is to check D2 and Pin2 of IC3.
    Also, as a (ugly) workaround, solder a 3.3V zener diode between VCC and GND. It will (more or less) consume any excess current that keeps VCC above 3V. It's ugly because zener diodes are nor precise and begin drawing current below the given voltage (hence 3.3V instead of 3V), and because it will only fix the symptom and not the cause of the problem, but it will definitely keep VCC from rising to 4V :)

    Good luck!

    P.s.: the BSL interface is a nice universal solution for any kind of MSP target, but way too complex if you know the specifics of your target.

  • Mike,

    I realize that there are missing USB files online. We're getting this fixed. In the meantime, see my attached project for BSL_Scripter that has all the necessary files that you would require to compile successfully.

    But, as far as the circuit goes, Jens-Michael has some great recommendations there.

    As for the VCC changing levels, are you referring to the TX and RX lines?

    Also, I would monitor IC2 VCC too to make sure the VCC is stable around the voltage regulator.

    Regards,

    William

    PC Application - USB and UART.zip
  • William,

         I couldn't access your attachment.  Is there something I don't understand about this site

    or some other procedure?

     

    Thanks,

    Mike Raines

  • William,     I am now able to access your attachment.  Thank you.  we received the device.  Again, Thank you.

    Our hardware guy, JJ is evaluating it to see why our implementation has issues.

    Stay tuned,

    Mike Raines


  • Sunil Shet posted RE: MSP430F5437 BSL problem in MSP430 Ultra-Low Power 16-bit Microcontroller Forum.

    Dear Sir,

    when i try to download the Application code to the MSP430F5438 using BSL programmer(BSL_Scripter.exe)

    i am facing following Problem...

    BSL Scripting application 1.06
    The local time is: 12:19 on 30.04.2012
    ------------------------------------------
    Initializing, Mode: 5438 COM: COM1 DONE
    Changing Baud Rate to 9600 DONE
    Mass Erase: FAIL(ee)
    RX Password: FAIL(ee)
    Writing MSP430TB.txt to device: FAIL writing data block starting at 5c00
    CRC from 5c00 of 4096 bytes to 982b FAIL....

    please help me...

    Thank you..

  • Dear Sir,

    when i try to download the Application code to the MSP430F5438 using BSL programmer(BSL_Scripter.exe)

    i am facing following Problem...

    BSL Scripting application 1.06
    The local time is: 12:19 on 30.04.2012
    ------------------------------------------
    Initializing, Mode: 5438 COM: COM1 DONE
    Changing Baud Rate to 9600 DONE
    Mass Erase: FAIL(ee)
    RX Password: FAIL(ee)
    Writing MSP430TB.txt to device: FAIL writing data block starting at 5c00
    CRC from 5c00 of 4096 bytes to 982b FAIL....

    please help me...

    Thank you..

**Attention** This is a public forum