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.

Could not initialize the target device

The IDE is Keil uVision4,and it says ,"could not initialize the target device. please power cycle the board and try again" and "flash download failed target DLL cancelled".

I programmed it initially with a blinky program using gpio port pn0 and pn1 connected to on-board leds. Initially the program run but now its showing this error. 

Am unable to find out the problem! 

NOTE- Am using TM4C1294GXL connected launchpad

  • Hi,

    Are there any external circuitry connected to the Tiva Connected Launchpad?

    Using LM Flash Programmer Erase Entire Flash of your Tiva MCU. Then try again to debug/run blinky example program using Keil Uvision.

    - kel
  • No external hardware is connected!
    Even in LM flash programmer it is showing "Error! Unable to initialize target"

  • Hi,

    Do you see your Tiva Connected Launchpad power led on? At Device Manager do you see Stellaris ICDI?

    If your answer to both questions is "yes", using LM Flash Programmer use the Debug Port Unlock Utility. If success unlock program blinky using LM Flash Programmer. If blinky works, then you have recovered your Tiva Connected Launchpad.

    Did you modify blinky before this "Error! Unable to initialize target" happened?

    - kel
  • Power LED is ON and i can see all the required drivers in device manager. I modified blinky multiple times, infact after running the program, i downloaded the following program on the board, it did run a number of times before facing this error.


    #define GPIODB ((unsigned int*)0x4006400C)
    #define MOSCTL ((unsigned int*)(0x40064000+0x07c))
    #define RCGC ((unsigned int*)(0x400FE000+0x608))
    #define GPIOD ((unsigned int*)(0x40064000+0x00))
    #define GPIODIR ((unsigned int*)(0x40064000+0x400))
    #define DEN ((unsigned int*)(0x40064000+0x51C))
    #define AFSEL ((unsigned int*)(0x40064000+0x420))
    #define GPIODR4R ((unsigned int*)(0x40064000+0x504))
    #define GPIOPUR ((unsigned int*)(0x40064000+0x510))
    #define GPIOPDR ((unsigned int*)(0x40064000+0x514))
    #define GPIOODR ((unsigned int*)(0x40064000+0x50C))
    #define GPIOLOCK ((unsigned int*)(0x40064000+0x520))
    #define GPIOCR ((unsigned int*)(0x40064000+0x524))
    #define AMSEL ((unsigned int*)(0x40064000+0x528))
    #define R2R ((unsigned int*)(0x40064000+0x500))
    #define R8R ((unsigned int*)(0x40064000+0x508))
    #define R12R ((unsigned int*)(0x40064000+0x53C))
    #define PCTL ((unsigned int*)(0x40064000+0x52C))
    #define PRGPIO ((unsigned int*)(0x400FE000+0xA08))
    #define RSCLKCFG ((unsigned int*)(0x400FE000+0x0b0))
    #include <stdint.h>
    void delay(int);
    unsigned int i;
    int main(void)
    {

    *RCGC |= 0x1000;
    *GPIODIR=0x03;
    *GPIOD=0x00;
    *DEN=0x03;
    *AFSEL=0x00;
    *GPIODR4R=0x03;
    *GPIOLOCK=0x4C4F434B;
    *GPIOCR=0x03;
    *GPIOPUR=0x03;
    *GPIOPDR=0x00;
    *GPIOODR=0x00;
    *AMSEL &=~(0x0F);
    *R2R=0x00;
    *R8R=0x00;
    *R12R=0x00;
    *PCTL=0x00;
    *PRGPIO=0x1000;
    *RSCLKCFG= 0x300000;
    while(1)
    {
    *GPIODB=0;
    delay(50);
    *GPIODB =3;
    delay(50);
    *GPIODB=0;
    delay(50);
    *GPIODB=3;
    }
    }

    void delay(int a)
    {
    for(i=0;i<a;i++){}
    }

  • Thanks. This help's me to restore my TM4C1294XL at the same situation.