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.

MSP430FR2433: BSL & JTAG Lock - Lunchpad & Custom PCB

Part Number: MSP430FR2433
Other Parts Discussed in Thread: MSP-FET, MSP-EXP430FR2433, UNIFLASH

Hello, 

My target is to lock both BSL and JTAG on MSP430FR2433, with a mass erase on wrong BSL password. That both on launchpad for testing and a custom PCB. 

  1. Is the correct approach to write over the following addresses in the FRAM in the beginning of the application code? If so…can someone provide an example please? I couldn’t find anything yet and I got confused a bit by the differences in each IC/documentation…since I have tried but I didn’t have a way to confirm yet…

BSL Password -> 0xFFE0 to 0xFFFF (top 16 words in the BSL interrupt vector table)

BSL Signature 2 -> 0FF86h (e.g. write BC87h)

BSL Signature 1 -> 0FF84h (e.g. write BC87h)

JTAG Signature 2 - 0FF82h     (e.g. write BC87h)

JTAG Signature 1 - 0FF80h (e.g. write BC87h)

  1. Or will both of this be possible through the BSL with? -> https://www.olimex.com/Products/MSP430/BSL/MSP430-BSL/
  2. Will I be able to confirm both BSL & JTAG lock as per SLAASE59D & 550S  with https://www.olimex.com/Products/MSP430/BSL/MSP430-BSL/  and  http://www.ti.com/lit/ug/slau573b/slau573b.pdf ? (CCS cannot confirm JTAG on this MSP i think)
  3. Should I be looking at the IPE option for the whole program or is this a bad approach/overkill and should only be used for only sections of a program?

Thanks,

Con

  • Hi Con,

    I think there is a slight misunderstanding on your side on the available options of the JTAG and BSL security options.

    Please see this table, which you can find in the MSP430FR2433 User's Guide.

    The option related to the automatic mass erase and BSL are either enabling the mass erase of the entire device on access attempt using a wrong password, or disabling it. There is no option for locking the BSL or the JTAG upon a wrong password transmission.

    Please keep in mind, the mass erase option, if enabled gives you the possibility regaining the access to the device also in case when you don't have the correct password, as transmitting the wrong password would trigger the mass erase. This would also erase the interrupt vector table, which results in a known password, which could be used to unlock the JTAG. It does not disclose the code image to the attacker, as you regain the access to a completely erased device. But someone could reprogram your HW with his code this way.

    The best source for further information on BSL features related to our MSP430 FRAM devices is the MSP430™ FRAM Devices Bootloader (BSL) User's Guide slau550q.pdf .

    Dependent on the selected mode for the BSL security, there are respective options to check, whether you have implemented the correct settings.

    1. BSL disabled completely. >> you cannot regain access to the device by the above described multi step approach with erase of the device.

    2. BSL password protected with mass erase enabled >> you can regain access to the device by erasing it with wrong password.

    For debugging purposes you could also leave the JTAG unlocked, and by this in debug mode check the signatures you're applying to the BSL.

    Best regards

    Peter

  • Hi Can,
    anything else we can do for you on this topic?

    Best regards
    Peter
  • Hello Peter,

    Thank you very much for suggestions apologies it took a bit to reply. 

    yes indeed i misphrased it i want this you are correct -> BSL password protected with mass erase enabled. 

    So will the rocket be required and abel to confirm the JTAG and BSL "lock"? 

    (I would assume you as well find that investing time in the IPE option too much for this cause since everything will be protected anyway...)

    Thanks,

    Con

  • Hello Con,
    JTAG and BSL access are two different paths and options to access the device. The rocket is a BSL tool, means it could, if you want so only be used to test, whether you can or cannot get access to the device via BSL interface.
    For testing whether the JTAG is or is not open and accessible, you'd need a tool, which supports JTAG accesses, like MSP-FET or others.

    Best regards
    Peter
  • Thanks for your reply Peter it has been helpful.

    Since ez-FET on MSP-EXP430FR2433 uses SBW which is a JTAG implementation and both are locked together I have confirmed the lock just by trying to access with CSS.  (And I got the message that JTAG is secured, therefore MSP-FET might be an overkill in my case, for now)

    Applied the lock f in-system  as per the guideline->

    #pragma RETAIN(JTAG_signatures)

    #pragma DATA_SECTION(JTAG_signatures, ".jtagsignature")

    const uint16_t JTAG_signatures[] = {0xAAAA, 0x0002};

    I just got a BSL Rocket in my hands so today I will be playing around with  the BSL as well I hope. 

    Just one last thing which still confuses me a bit please if you can elaborate:

    In SLAU550S, section 3.6.1.2 shows it’s possible to change the BSL signature and password through the cmd file just as the JTAG signature as above.(perhaps only for FR235x and FR215x?). So I assume that’s not possible FR2433 since I can only find .bslsignature and .jtagsignature in its .cmd. However, the addresses for the BSL password are FFFFh to FFE0h (User defined + Vector table configuration) (The BSL password is equal to the content of Interrupt Vector table on the device as stated in the same document). Therefore if understand correctly the password and signatures/configuration is located In the top of FRAM in interrupt vectors  (which range is FFFFh to FF80h) while the BSL itself is in ROM. So couldn’t one disable the FRAM Write Protection and write on these addresses in order to set a new BSL password using an in-system approach as with JTAG?  It confuses me why FF80h-83h for JTAG signature and FF84 to FF87 BSL signature are accessible but BSL password is not through .cmd?

    Thanks a lot again, regards,

    Con

  • Hi Con,
    in the document you've mentioned, you can find in section 7 the listing of the different BSL version for the respective FR derivatives. There you can see some differences listed for FR2433 versus FR235x and FR215x.
    Regarding your question on the BSL password and the .cmd file. In case of the BSL password it makes no sense to control it by the .cmd file, as the BSL password is the content of the interrupt vector table. Now the content of the interrupt vector table is the result of the compilation of your code. Thus the Compiler is responsible for the password creation, if you put it that way. Otherwise you would have to force placing the Compiler the code of the ISRs according to the .cmd file, which makes no sense.
    Thus you could also say the difference in terms of the BSL passowrd handling is given by the double function of the used memory locations, on one hand for the ISR code and on the other hand as BSL password, which is actually the "secondary" function, while in case of the JTAG signature and BSL signature this is the primary and the one and only function.

    Best regards
    Peter
  • Hello Peter,

    Thank you, I think that sums up all my questions, now the user defined + interrupt vector table makes perfect sense.
    I have confirmed it today by flashing an example, reading the memory at 0xFFE0 with uniflash and then making the password from there. The other day it was always wrong and I couldn’t figure out why after flashing mine or default password wouldn’t work (not a tiny detail to miss :) ).

    A small note for new people using uniflash & BSL script is to mind the target memory contents on their password file ->e.g. on uniflash memory it is displayed as DE35, pay attention to the contents which are 0xFFE0: 35 0xFFE1: DE, on your BSL password file write it as 35 DE etc etc.

    Thank you a lot for all your time and explanations. Hope this thread helps more people in case they are stuck :D
    Regards,
    Con

**Attention** This is a public forum