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.

CCS/MSP430FR5949: JTAG issue, Error connecting to the target: The Debug Interface to the device has been secured

Part Number: MSP430FR5949
Other Parts Discussed in Thread: MSP430FR5849, MSP-FET,

Tool/software: Code Composer Studio

Hi,

I have seen this issue popping up in several E2E threads but have difficulties finding an answer that works for me.

I am using own hardware based on the MSP430FR5949DA (schematic says MSP430FR5849 but this is a typo), using CCS Version: 7.4.0.00015  and a MSP-FET Flash emulation tool

I already loaded firmware several times into the MSP430 without any problems during my firmware development.

Suddenly after starting CCS and trying to load a modified program I got the message "Error connecting to the target: The Debug Interface to the device has been secured".

From what I understand is some sort of security enabled.  Is this permanent or can it be overided?

Can you walk me through the procedure to solve this so that I can load code via the JTAG in the MSP430 again or do I have to solder another MSP on my board?

Attached the schematic of the MSP430.

The analog switch is to route the RS232 from the display to CONN1 when firmware must be downloaded into the display or connect the RS232 from the MSP430 to the display and the SPI from the MSP430

to CONN1 to another board)

DisplayUnit.pdf

  • You can put your FR device back to factory (unlocked / erased) state by BSL. MSP-FET support BSL interface, so it can be used in combination with BSL-Scripter wrong password to trigger mass erase.
  • Hi,

    Is there a description how to use the BSL to get the device back to factory settings using the BSL?

    Is the JTAG alone sufficient to do this or are additional pins needed (RS232 or I2C).

    Thanks.

  • Hi,

    In SLAU320, page 320 I read that you can unlock the JTAG of an MSP430FR5949 by providing the correct password and length via the JTAG mailbox.

    The MSP430FR5xx-6xx users guide SLAU208n indicates one needs to use the BSL for that, seem contradictive.

    If the JTAG mailbox can be used, is there a description how to unlock the JTAG using that mailbox. If not, where can I find the details how to unlock the JTAG using BSL.

  • Hi,

    Searching further I found that the MSP FET USB supports the BSL UART (page 27 of SLAU647L)

    Looking at my schematic, which additional pins of the 14 pin JTAG connector should I connect to the MSP430FR5949 UART pins to make the MSP FET debugger support BSL.

    Is this then supported within CCS?

  • If you know the JTAG password (and I guess that you don't know) than JTAG access can be unlocked with mailbox system by using correct JTAG password.

    Some devices (for example FR4xx) can also put JTAG locked device back to factory state (mass erased / unlocked) with mailbox system, without knowing JTAG password. Unfortunately, your device can be unlocked only by BSL. Here you can see script and log example...

    forum.43oh.com/.../
  • Hi,

    Thanks for the feedback but I am a novice when it comes to MSP430 reparing locked bits so I will need some more details on how exactly to do this.

    Are there app notes describing unlocking via the BSL.

    I asume I can use my MSP-FET-USB tool as it seems to suport a back channel RS232 but how do I make the SR232 connections from the 14 pin JTAG header to the RS232 port of the MSP430FR5949?

    Can I use CCS to control the BSL ahd how do I do that or is a special program required supported by the MSP-FET-USB tool?

    This type of basic questions I am seeking answers for.

    Hope you can help me getting started with that.

  • Hi Jan,

    Please refer section 2.4 of below document about how to protect and unlocking method.
    MSP430 Programming With the JTAG Interface: www.ti.com/.../slau320ad.pdf

    You can find the all the resources of BSL here: www.ti.com/.../mspbsl
  • The MSP-FET uses 4 lines (TXD, RXD, CTS, RTS) for the UART BSL channel whilst the MSP430FR5949 only has TXD and RXD available for the BSL UART.
    Will the MSP-FET work alsowithout RS232 handshaking?
  • MSP-FET support UART handshake, that is not used for BSL. For UART BSL connection are needed 6 lines between FET and target device:

    VCC

    GND

    TEST

    RESET

    TXD

    RXD

  • Hi Zrno,

    Thanks for confirming that. 

    I connected the UCA0TXD and UCA0RXD pins of my target MSP430FR5949 to the JTAG connector pins and downloaded the BSL scripter firmware.

    When invoking the BSL scripter tool it asks for the name of the file script.

    My assumption is that if I create a plain text file with the following text this should do a mass erase and unlocking of my target device

    MODE FR59 USB    -> indicates my MSP430FR5949 target device and the PC port connecting the MSP-FET

    MASS_ERASE          -> indicates the mass erase of my target device thereby unlocking the JTAG

    Thanks in advance for the confirmation and help.

  • My script for FR5739 is...

    MODE 5xx COM22
    VERBOSE
    MASS_ERASE
    RX_PASSWORD

    USB is related to USB BSL, MSP430 devices with USB hardware module. For your device you should use CDC port name for MSP-FET UART channel.

    Please, check this posts...

    https://e2e.ti.com/support/microcontrollers/msp430/f/166/p/391358/1386880#1386880

    https://e2e.ti.com/support/microcontrollers/msp430/f/166/p/533537/1952148#1952148

  • Hi Zrno,

    I checked the hardware control in my computer and it looks like this

    I chose COM6 in the script file that looks like:

    MODE FRxx UART COM6
    VERBOSE
    MASS_ERASE

    If I run BSL-Scripter with that command file (unlock.txt), I get the following response.

    DO you know what this error message means?

    If I change to COM5 I get the same error message.  I can also leave in the MODE line UART out with the same result.

    If I try to connect my JTAG to the MSP430FR5949 target I still get the same locked message so I have the feeling there was no mass erase done by BSL.

    Any idea what I am doing wrong?

  • Hi Zrno,

    Some pics didn't made it in my previous reply.

    Here the MSP COM ports displayed in my computer hardware list

    Here the screenshot of the command line response of BSL-Scripter

    Hope you can help me with that one.

    Regards

  • If you are working with last BSL Scripter version, that will automatically switch to 9601 baud rate to trigger MSP-FET BSL entry sequence, than problem can be in hardware connection.
  • Hi Zrno,

    I think I understand why it does not work.

    The BSL doesn't get initiated properly.

    For that there must be a standard reset sequence as per SLAU550p, page 7.

    This involves both the RESET line (pin 11 of the 14 pin JTAG header) and the TEST line(pin 8 of the JTAG header).

    RESET (JTAG pin 11) must be connected to the RST/NMI of the target but with a SBW setup pin 11 is not connected and the target RST/NMI pin is connected to to JTAG pin 1 (TDO/TDI)

    My conclusion is that you need to have the full blown JTAG connections implemented and not SBW to make BSL work.

    Can you confirm that?

    If my conclusion is correct, I can jumper the RESET pin of the JTAG connector to the RST/NMI pin of my target, asuming the TDO/TDI pin is not used in BSL operations.

  • Hi Zrno,

    I connected pins 1 and 11 of my JTAG connector and it looks the BSL is responding but still an error on the MASS-ERASE command, see below.

    Any idea what this can be?

  • Hi Zrno,

    I am sure the BSL connection is OK since I get the BSL version back from the target.

    Still no idea why the MASS_ERASE gives an error message.

    Maybe a bug in the BSL-Scripter or the BSLof the target itself?

    As far as I understand is the BSL of the MSP430FR5949 in ROM so cannot be erased.

  • Try to write 0xFF bytes to JTAG fuse address. Add line " RX_DATA_BLOCK RESET_FUSE.txt " to script file.

    RESET_FUSE.txt

    @0FF80
    FF FF FF FF
    q

**Attention** This is a public forum