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.

MSP430F6723 Code Protection / JTAG / BSL

Other Parts Discussed in Thread: MSP430F6723

MSP430 TEAM,

Our customer has asked for clarification/confirmation on the code protection function:

-----

I've been asked to look into protecting code on our MSP430F6723 on the latest design refresh. Reading through the literature, this is how I understand the code protection features work.

 1.    If one programs the JTAG security key memory (at addresses 0x17FC to 0x17FF) to a non-default value, the JTAG interface on the F6723 will be disabled, preventing people from reading code out that way.

2.    One would need to set that JTAG security key from running software on the processor (as opposed to setting it up in the binary file that’s programmed onto the part by the vendor), because you need to modify the SYSBSLPE bit in the SYSBSLC register to do so. (I think this implies an automated test command to tell the microcontroller to lock itself.)

3.    The Bootstrap Loader (BSL) can be used to subsequently unlock the processor, if the correct password is provided to it. This password is the highest 32 bytes of the interrupt vector table, which one would know because one would have access to the binary that’s programmed onto the device.

4.    The device will automatically erase its flash if an incorrect password is provided to the BSL.

HOWEVER, in #2, can you confirm that one would have to have software running on the processor to write the JTAG security key? (In general I believe this particular customer can't use the BSL on the part to do so because they have Automated test equipment systems that they can't or don't want to change, so communications would have to be compatible with the existing design.) Or could one do it via a code section in the binary file for programming the parts that is provided to the applicable venders?

COMMENTS WELCOMED and APPRECIATED!

Thanks,
Chris

  • Chris,

    Regarding option 2, most of our TI tools have an integrated option (like a checkbox or similar) for disabling the JTAG (either blowing the fuse on older devices, or setting the JTAG security key on newer devices). I strongly recommend using this if at all possible.

    On tools that do not have this feature, then yes, you can lock the JTAG by setting the binary to have a a locking value in the JTAG security key. As you mention, you do need to unlock the BSL to modify this value. All of our tools have hooks for unlocking the BSL section of flash. One thing to be aware of is that most tools erase flash before writing the new values, and all flash erases are done in segments. So the tool will likely try to erase a whole segment of BSL, which means you need to write it back. This is why i recommend using a tool with a built-in option for disabling JTAG...it does all of this for you.

    Mike
  • Thank you Mike! As always, your input is spot-on and greatly appreciated. I'll keep you posted on any necessary follow-up.

    Regards,
    Chris

**Attention** This is a public forum