KB 02: JTAG functionality has been locked / JTAG Communication Failures

 

When you attempt to download the program code to the TI Tiva board, a popup window appears with the following error.

"Stellaris ICDI Error: Could not initialize target device! Please power cycle the board and try again."

After you hit accept and another popup window appears with the following error:

"Error: Flash Download failed - Target DLL has been canceled"


Solution:

It is possible to run program code on a Tiva C Series device that causes the device to lose JTAG communication. The two most common causes:

  1. Changed the system clock speed to something that the target system does not support.
  2. Changed the function of the Port C[3:0], which are muxed with the JTAG pins.

If you accidentally do either of these things, you can restore communication with your target device by running the Debug Port Unlock utility in LM Flash Programmer as shown below.

 

  1. Before using the LM Flash Programmer tool, the Stellaris ICDI driver must be installed at your computer. Connect the Tiva LaunchPad to the computer and check the driver at the Device Manager.
  2. Download and install LM Flash Programmer onto your computer: http://www.ti.com/tool/lmflashprogrammer
  3. Run the LM Flash Programmer
    Make sure that the TI Code Composer Studio and/or Keil μVision are closed. Otherwise, the IDEs and the LM Flash Programmer will "fight" for control of the board.
    Click the LM Flash Programmer icon TI LMFlashProg 16 to launch the Flash Programmer
    01 LMFlashProg MainWindow s

 

If by using the Debug Port Unlock Utility several times, you are unable to recover your board, then it is possible that there is something damaged at the board. If you don't have the capacity to debug the problem at the board level, then I suggest you get a new Tiva LaunchPad.