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.

MSP430F2132: MSP430 BSL error Password question

Part Number: MSP430F2132

After the BSL entry, I send an error Password to the BSL,  I think that the ACK shoud be 0xA0, but it actually is 0x90, why? And how to judge the Password whether it is correct?

such as, I have downloaded a code to the MSP430F2132, then I download the code the second time,I use the command as follows:

80 10 24 24 E0 FF 20 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 9B 34

the BSL returns 0x90

why not the 0xA0?

  • If you've already provided the correct password then the device remains unlocked until another BSL entry is initiated, therefore a DATA_ACK response will be provided even after an incorrect password command follows. Otherwise a DATA_ACK in this situation would indicate that a mass erase has already been performed (0xFFE0 to 0xFFFF is all 0xFF), making the password provided valid for BSL entry. BSL version 2.02 included on the MSP430F2132 has enhanced security features controlled by the flash data word located beneath the interrupt vector table addresses (0xFFDE). If this value is not 0x0000 then the entire flash memory address space will be erased when an incorrect password is transmitted. You will want to verify the BSL key, current program memory contents, and state of your device's BSL.

    Regards,
    Ryan
  • Thanks Ryan!


    if I provided the correct password after BSL entry initiated, the device response correctly, the DATA_ACK is 0x90. It's OK.


    But If I provided the error password after BSL entry initiated, I want to know whether the device response or not except the mass erase. If the device response, It is 0x90 or 0xA0.


    Now I provided the error password after BSL entry initiated, the device response 0x90 and mass erase, I don't know why it is 0x90.
  • If you have already entered the BSL with a correct password and then provide the wrong password, the BSL should respond with a DATA_ACK and not perform any changes (mass erase or otherwise) since the device has already been unlocked. Only once another BSL entry is initiated will an incorrect password result in a DATA_NACK. Why are you trying to send an incorrect password when the BSL is already unlocked? If you want to know whether the first password you sent was valid or not this should have been confirmed through the original response, or you can try to receive a data block.

    Regards,
    Ryan
  • Hi Ryan:

    I'm developing a programmer. Sometime the customer will download their code to a new device and download several times to test the programmer, and sometime they  will download their code to a device which they don't know the password.Usually they use the code file as the password file. No matter what situation,I hope the download be successful at one time.

    So in my application , I will judge the returns of the device when I provide the password.  If the return is 0x90,I think the password is correct, if the return is 0xA0 or other data, or overtime,I think the password is incorrect, then after the mass erase I will provide the default password (all is 0xFF) so as the download continue.

    But afer the first BSL entry, if I provide the error password, the device also returns 0x90, so I can't judge the password whether correct or not, so that I will not provide the default password(all is 0xFF), and the download exit.

    So I ask for help,why the device returns 0x90 when I provide the error password.

  • 0x90 will be returned if the BSL has been entered and the packet has been formatted correctly. Perform a simple command to receive a data block (or some other password-protected command) and if this is rejected then you will know that the BSL has not been entered.

    Regards,
    Ryan
  • Ryan Brown1 said:
    If you have already entered the BSL with a correct password and then provide the wrong password, the BSL should respond with a DATA_ACK and not perform any changes (mass erase or otherwise) since the device has already been unlocked.

    As I know, a special sequence is needed to involve the BSL, but the password is not the preconditon.

**Attention** This is a public forum