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.

TIVA Launchpad Debug Error!

Other Parts Discussed in Thread: ASH, LMFLASHPROGRAMMER, UNIFLASH

Hello,

For the past 6 months, my TIVA Launchpad has been running perfectly well. All of a sudden, I am unable to debug the device!!
I get the error, "Unable to connect to the device" and a Frequency error.

I looked online and tried the following :

1. Pull out and plug the board back in.

2. Restart CCS (v5) and try again

3. Use the LM Flash Programmer (got the error "Unable to initialize the device -0 "

4. Try a bulk erase to unlock the device using LM Flash Programmer.

Even then, the error persists.


Further details ;

1. Device drivers are up to date. I checked in device manager.

2. Latest version (1601) of LM FLash Programmer

3. My GPIO pins do not conflict with the JTAG pins.

4. I am using a Windows 8 PC and also tried it in my friend's PC. Still the error persists.

Can someone please help me to resolve this problem? Is my board dead or is there a workaround?

-- Ash

  • Hi Ashwin,

    Ashwin V said:
    4. Try a bulk erase to unlock the device using LM Flash Programmer.

    Do you mean "use LM Flash Programmer Debug Port Unlock Utility"? Have you done so? The utility can be found at the "Other Utilities" tab of the LM Flash Programmer.

    -kel

  • Hello Kel,

    That is exactly what I did. I used the Debug Port Unlock where I chose "Fury, Dust Devil, TM4C123 and TM4C129 classes" option. In the end, the message at the bottom was "unlock complete". But then the error persists.

    -Ash

  • Hi Ashwin,

        Provide more details regarding the last activity you did before this happened. What was the last program that you loaded? See, if you have locked the JTAG from the post below.

        JTAG Communication Failures

        Try, hold reset when using the LM Flash unlock feature. See post below.

         LM4F120H5QR Stuck in Hibernation Mode

    -kel

  • This is the last program that i used. Was working fine. But the last time I used the board was over 3 weeks ago. But that shouldn't affect anything! I looked at both the links and tried it again. Still not working.


    #include <stdbool.h>
    #include <stdint.h>
    #include "inc/hw_memmap.h"
    #include "utils/uartstdio.h"
    #include "driverlib/adc.h"
    #include "driverlib/gpio.h"
    #include "driverlib/pin_map.h"
    #include "driverlib/sysctl.h"
    #include "driverlib/uart.h"
    #include "utils/uartstdio.h"
    #include "inc/hw_types.h"
    #include "inc/hw_memmap.h"
    #include "inc/hw_gpio.h"
    #include "driverlib/sysctl.h"
    #include "driverlib/pin_map.h"
    #include "driverlib/rom_map.h"
    #include "inc/hw_adc.h"
    #include "inc/hw_uart.h"


    //*****************************************************************************
    //
    // This function sets up UART0 to be used for a console to display information
    // as the example is running.
    //
    //*****************************************************************************
    void
    InitConsole(void)
    {
        //
        // Enable GPIO port A which is used for UART0 pins.

        //
        SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);

        //
        // Configure the pin muxing for UART0 functions on port A0 and A1.
        // This step is not necessary if your part does not support pin muxing.

        GPIOPinConfigure(0x00000001);
        GPIOPinConfigure(0x00000401);

        //
        // Enable UART0 so that we can configure the clock.
        //
        SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);

        //
        // Use the internal 16MHz oscillator as the UART clock source.
        //
        UARTClockSourceSet(UART0_BASE, UART_CLOCK_PIOSC);

        //
        // Select the alternate (UART) function for these pins.

        //
        GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1);

        //
        // Initialize the UART for console I/O.
        //
        UARTStdioConfig(0, 115200, 16000000);
    }

    //*****************************************************************************
    //
    // Configure ADC0 for a single-ended input and a single sample.  Once the
    // sample is ready, an interrupt flag will be set.  Using a polling method,
    // the data will be read then displayed on the console via UART0.
    //
    //*****************************************************************************
    int
    main(void)
    {    float a,b;
        int c,d,e;


        //
        // This array is used for storing the data read from the ADC FIFO. It
        // must be as large as the FIFO for the sequencer in use.  This example
        // uses sequence 3 which has a FIFO depth of 1.  If another sequence
        // was used with a deeper FIFO, then the array size must be changed.
        //
        uint32_t pui32ADC0Value[1];

        //
        // Set the clocking to run at 20 MHz (200 MHz / 10) using the PLL.  When
        // using the ADC, you must either use the PLL or supply a 16 MHz clock
        // source.

        //
        SysCtlClockSet(SYSCTL_SYSDIV_10 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN |
                       SYSCTL_XTAL_16MHZ);

        //
        // Set up the serial console to use for displaying messages.  This is
        // just for this example program and is not needed for ADC operation.
        //
        InitConsole();

        //
        // Display the setup on the console.
        //
        UARTprintf("ADC ->\n");
        UARTprintf("  Type: Single Ended\n");
        UARTprintf("  Samples: One\n");
        UARTprintf("  Update Rate: 250ms\n");
        UARTprintf("  Input Pin: AIN0/PE3\n\n");

        //
        // The ADC0 peripheral must be enabled for use.
        //
        SysCtlPeripheralEnable(SYSCTL_PERIPH_ADC0);

        //
        // For this example ADC0 is used with AIN0 on port E7.
        // The actual port and pins used may be different on your part, consult
        // the data sheet for more information.  GPIO port E needs to be enabled
        // so these pins can be used.

        SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOE);

        //
        // Select the analog ADC function for these pins.
        // Consult the data sheet to see which functions are allocated per pin.

        GPIOPinTypeADC(GPIO_PORTE_BASE, GPIO_PIN_3);

        //
        // Enable sample sequence 3 with a processor signal trigger.  Sequence 3
        // will do a single sample when the processor sends a signal to start the
        // conversion.  Each ADC module has 4 programmable sequences, sequence 0
        // to sequence 3.  This example is arbitrarily using sequence 3.
        //
        ADCSequenceConfigure(ADC0_BASE, 3, ADC_TRIGGER_PROCESSOR, 0);

        //
        // Configure step 0 on sequence 3.  Sample channel 0 (ADC_CTL_CH0) in
        // single-ended mode (default) and configure the interrupt flag
        // (ADC_CTL_IE) to be set when the sample is done.  Tell the ADC logic
        // that this is the last conversion on sequence 3 (ADC_CTL_END).  Sequence
        // 3 has only one programmable step.  Sequence 1 and 2 have 4 steps, and
        // sequence 0 has 8 programmable steps.  Since we are only doing a single
        // conversion using sequence 3 we will only configure step 0.  For more
        // information on the ADC sequences and steps, reference the datasheet.
        //
        ADCSequenceStepConfigure(ADC0_BASE, 3, 0, ADC_CTL_CH0 | ADC_CTL_IE |
                                 ADC_CTL_END);

        //
        // Since sample sequence 3 is now configured, it must be enabled.
        //
        ADCSequenceEnable(ADC0_BASE, 3);

        //
        // Clear the interrupt status flag.  This is done to make sure the
        // interrupt flag is cleared before we sample.
        //
        ADCIntClear(ADC0_BASE, 3);

        //
        // Sample AIN0 forever.  Display the value on the console.
        //
        while(1)
        {
            //
            // Trigger the ADC conversion.
            //
            ADCProcessorTrigger(ADC0_BASE, 3);

            //
            // Wait for conversion to be completed.
            //
            while(!ADCIntStatus(ADC0_BASE, 3, false))
            {
            }

            //
            // Clear the ADC interrupt flag.
            //
            ADCIntClear(ADC0_BASE, 3);

            //
            // Read ADC Value.
            //
            ADCSequenceDataGet(ADC0_BASE, 3, pui32ADC0Value);

            //
            // Display the AIN0 (PE7) digital value on the console.
            //
            a=pui32ADC0Value[0]*(3.3/4096);
            b=(1000*a);
            c=b;
            d=(c-(c%1000))/1000;
            e=c%1000;

            UARTprintf("%4d", pui32ADC0Value[0]/16);

            UARTprintf("\n");

            //
            // This function provides a means of generating a constant length
            // delay.  The function delay (in cycles) = 3 * parameter.  Delay
            // 250ms arbitrarily.
            //
            SysCtlDelay(SysCtlClockGet() / 1200);
        }
    }

  • Hi Ashwin,

        While the launchpad is powered, touch the IC's. See if any IC is heating up unusually.

        With the launchpad not powered, do a visual inspection of the board. See, if anything is out of the ordinary.

    -kel

  • Hello Kel,

    Thank You for being patient.

    I tried what you said. I couldn't spot any abnormalities and neither were there any hot ICs. 

    So, is the board dead?

    --Ash

  • Hi Ashwin,

        Try my earlier advice, hold reset when using the LM Flash unlock feature. See post below.

         LM4F120H5QR Stuck in Hibernation Mode

        Also, try using a different USB cable. If these does not work, I am out of ideas.

        I don't believe, the board is dead if there are no problems with any components. It would be helpful if you are able to check using tools. 

    -kel

  • This sounds strange, but here is what I suggest (if you haven't done so already).

    1. Confirm that the Tiva ICDI device shows up in Device Manager.  You should see a COM port and a debug interface.
    2. Download the latest version of LM Flash (1601) and select the ICDI firmware update button in the 'Other Utilities' tab.  Older version of LM Flash between the mid 1400s and 1601 had some issues with the debug port unlock feature.
    3. Try running the debug port unlock feature for TM4C123 series.
    4. If (3) does not work, try the option for Tempest/Firestorm.  The difference isn't that big, and I've seen instances where this option will "kick" the device enough to get it to unlock.

    If those don't work, check the basics - power, clocks, etc.  It's possible something like ESD damaged your board.

  • hello ashwin


    did got any  solution for the problem because i am facing the same problem if ! kindly help me out

  • Hello Keerthi,

    I have seen one instance where Windows8 Machines do not allow the USB port to work well. Can you try switching to a Windows7 PC/Laptop or use a dock for Windows8 Laptops.

    Also please do check if you have the latest LMFlashProgrammer. Can you send the last binary file that you flashed to the board and which board it was, DK/EK TM4C123/TM4129?

    Regards

    Amit

  • Hi Keerthi,

    Sadly i couldn't find a solution and the board hasn't connected for the past 3 months. This is a major design flaw in the board.

    Regards,
    Ashwin V

    (didn't work in different PCs with different Operating Systems)

  • HELLO AMIT 

    HOW TO SEND THE BINARY FILE IN THE ATTACH MENU I CANT ATTACH THE TEST.BIN FILE IN IT ITS NOT SUPPORTING

    CAN YOU TELL ME HOW TO PROGRAM THROUGH UART  

  • @Keerth,

        Seems, your question is not related to this post. Next time just create a new post.

        Detail your procedure how you are not able to attach .bin file. Are you using LM Flash Programmer?

    -kel

  • hello markel

    i mean i want to attach the file test.bin along with reply to mr.amit the @ attach menu is not supporting the bin file


    and not on the target board !

    and s iam using lm flash programmer 1613

  • Hi,

    You may .zip your .bin file before attaching, .zip is supported AFAIK.

    Also, in Tiva/boards/your_board_applications you have genuine .bin files, compiled by TI to test them directly.

    Also, on W8, did you configured the firewall to accept the incoming USB connections from your board?

    Petrei

  • hello petrei

    i am using windows 7, the driver initialize looks fine

    while i running the debug unlock port its show unlock complete

    but while i running erase entire flash/hardware reset the error message unable to initialize target-0!

    the board i am using is   ek-tmc123gxl

    can you tell how to debug through uart?

  • Hi,

    You may try to reset the PC also; sometimes happened to me also. A good alternative to LMFlash is UNIFLASH utility.

    Also some hardware problems: is your board correctly powered? JP connection is in the position "ICDI" ? The LMFlash clock is set to the board's crystal? Jtag frequency is set lower than crystal/8? 

    Petrei

  • I faced the same issue when I connected the board via a usb hub to my pc. After connecting the board directly to PC the issue is not seen anymore. Not sure If this will help you.

  • Vineel Kovvuri said:
    I faced the same issue when I connected the board via a usb hub to my pc

     From your post power problem can be sharing same port. Is this HUB powered or just draw current from Port and more than Launchpad is connected to? If yes current limit or bad section of USB cable can drop voltage on usb power line creating this issue and more other too.