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.

MSP430F2272 BSL Password File

Other Parts Discussed in Thread: MSP430F2272

Hi,

i am trying to flash the MSP430F2272 via BSLDEMO2.exe. To get the INFO Flash segment A restored i need  a password file.

I read that this file consists of the 16 interrupt vectors, in a format like this:

@FFE0
00 F0 00 F0 00 F0 00 F0 00 F0 00 F0 00 F0 00 F0
00 F0 00 F0 00 F0 00 F0 00 F0 00 F0 00 F0 00 F0
q

But i have no idea where to find these vectors. In the datasheet (page 16)  there is a table of them, but only with their adresses.

Can anyone please give me a hint?

Best Regards,

Alex

  • Hi alexander,

    this depends of course on your firmware which has been flashed into the device. You can generate TI-TXT file if you are using CCS or IAR to build the software as described here:

    http://processors.wiki.ti.com/index.php/MSP430_FAQ#How_can_i_generate_TI_TXT_output_file_with_CCSTUDIO_or_IAR.3F

    If you do mass erase, this password should be then all 0xFFs.

    I hope this helps.

  • Hi Leo,

    i am using CCS and do generate TI-TXT files.

    But i do not know why the password file is depending on my firmware.

    My goal is, that the INFO Segment A is restored after the mass erase.

    Best Regards

  • Hi Alexander,

    because the password is basically using the interrupt vector table (content of address 0xFFE0 to 0xFFFF)which should be unique to each application firmware. Since you should be the only one who has access to the firmware, it should be safe to use this method.

    looking into the BSL documentation, it seems :

    it seems the way to retain your INFOA is to do warm start (calling BSL from application and using the vector of address 0x0C02), but you should retain the LOCKA bit so the InfoA is still protected while doing mass erase.

    Hope this helps

  • Hi Leo,

    thanks for your help.

    Yes i am calling BSL from application, but the LOCKA bit is set.

    I opened my TI-TXT File in an editor, here is the end of the file:

    00 00 09 00 14 03 00 00 00 00 00 00 00 00 00 00
    01 00 2F 03 00 00 01 00 30 03 FA 00 01 00 EA 02
    00 00 01 00 FE 02 00 00 06 00 1E 03 00 00 01 00
    00 00 02 00 32 03 FF FF 00 00
    @ffe4
    88 9C
    @ffea
    E0 93
    @ffee
    9E B6 F4 90 74 C1
    @fffe
    F6 BE
    q

    Does this mean that my needed password is:

    FF FF 00 00 88 9C FF FF

    FF FF E0 93 FF FF 9E B6

    F4 90 74 C1 FF FF FF FF

    FF FF FF FF FF FF F6 BE

    Regards,

    Alex

  • Hi Alexander,

    Alexander Kiermayer said:

    Does this mean that my needed password is:

    FF FF 00 00 88 9C FF FF

    FF FF E0 93 FF FF 9E B6

    F4 90 74 C1 FF FF FF FF

    FF FF FF FF FF FF F6 BE

    Looking at the TXT file you gave above, I think it should be:

    FF FF FF FF 88 9C FF FF

    FF FF E0 93 FF FF 9E B6

    F4 90 74 C1 FF FF FF FF

    FF FF FF FF FF FF F6 BE

    Let me know whether it works.

  • MSP430 Bootstrap Loader Communication Program (Version 2.00)
    Number of mass erase cycles set to 1.
    Read InfoA Segment...
    Transmit PSW file "int_vect.txt"...
    WARNING: This command might change data at address 216 or 217!
    ERROR: Communication Error!

    This is the output of BSLDEMO2 when using the password file:

    @FFE0
    FF FF FF FF 88 9C FF FF FF FF E0 93 FF FF 9E B6
    F4 90 74 C1 FF FF FF FF FF FF FF FF FF FF F6 BE
    q

  • Sry, now i think it works:

    output:

    MSP430 Bootstrap Loader Communication Program (Version 2.00)
    Number of mass erase cycles set to 1.
    Read InfoA Segment...
    Transmit PSW file "int_vect.txt"...
    WARNING: This command might change data at address 216 or 217!
    Mass Erase...
    Transmit standard password...
    BSL version: 2.02 - Family member: F227 - Process: 5040
    Change Baudrate from 9600 to 19200 Baud (Mode: 1)

    ....


    19942 bytes programmed.
    Verify... already done during programming.
    Restore InfoA Segment...
    Programming completed.Prog/Verify: 24.5 sec - Over all: 25.7 sec

    Why is it doing a mass erase nonetheless?

  • Hi Alexander,

    which parameter(s) do you pass to the BSLDEMO2.exe?

    Here is the complete list of BSLDEMO2.exe parameters:

    >BSLDEMO2.exe -h
    MSP430 Bootstrap Loader Communication Program (Version 2.00)
    BSLDEMO [-h][-c{port}][-s{num}][-p{file}][-w][-1][-m{num}][+ecpvruw] {file}

    Options:
    -h Shows this help screen.
    -c{port} Specifies the communication port to be used (e.g. -cCOM2).
    -a{file} Filename of workaround patch (e.g. -aWAROUND.TXT).
    -b{file} Filename of complete loader to be loaded into RAM (e.g. -bBSL.TXT).
    -e{startnum}
    Erase Segment where address does point to.
    -m{num} Number of mass erase cycles (e.g. -m20).
    -p{file} Specifies a TI-TXT file with the interrupt vectors that are
    used as password (e.g. -pINT_VECT.TXT).
    -r{startnum} {lennum} {file}
    Read memory from startnum till lennum and write to file as TI.TXT.
    (Values in hex format.)
    -s{num} Changes the baudrate; num=0:9600, 1:19200, 2:38400 (e.g. -s2).
    -w Waits for <ENTER> before closing serial port.
    -x Enable MSP430X Extended Memory suppport.
    -1 Programming and verification is done in one pass through the file.

    Program Flow Specifiers [+aecpvruw]
    a Restore InfoA after mass erase (only with Mass Erase)
    e Mass Erase
    c Erase Check by file {file}
    p Program file {file}
    v Verify by file {file}
    r Reset connected MSP430. Starts application.
    u User Called - Skip entry Sequence.
    w Wait for <ENTER> before closing serial port.
    Only the specified actions are executed!

    Default Program Flow Specifiers (if not explicitly given): +ecpvr

  • BSLDEMO2.exe -cCOM1 -ppassword.txt -s1 -m1 +aepvr bin.txt

    If i have a new shipped MSP with calibration data in segment A, do i have to use the "standard password".

    So i call BSLDEMO2.exe -cCOM1 -s1 -m1 +aepvr bin.txt ?

  • Alexander Kiermayer said:
    If i have a new shipped MSP with calibration data in segment A, do I have to use the "standard password".

    Yes. The 'standard password' of an unprogrammed MSP (empty flash) is all bytes 0xff.
    If you have a programmed MSP and do not know the password, you should be able to call thw BSL and do a mass erase, This will empty main and info memory (and should leave protected INFOA intact, but warning! I'm not 100% sure of that) and then you can access the flash using the standard password.

  • Ok thanks a lot.

    One very last question:

    I have a programmed MSP and have the corresponing TI-TXT File. Do i have to use the password of the firmware which is on the MSP or  the password of the firmware i like to flash on it?

    Regards, Alex

  • Alexander Kiermayer said:
    Do i have to use the password of the firmware which is on the MSP or  the password of the firmware i like to flash on it?

    It's not Windows :) What sense makes a password if you provide the information whether it is valid yourself? Of course, the BSL can only compare it to the firmware that is already on the MSP - to check whether you know this firmware already and therefore are allowed to access the data on the chip.

    As I said, you can always do a mass erase (which resets the password but also clears the firmware) and flash your new firmware.

**Attention** This is a public forum