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/TM4C129ENCPDT: Unable to program custom board

Part Number: TM4C129ENCPDT

Tool/software: Code Composer Studio

Hello All,

Im trying to program a custom board using xds 100 v2.

While connecting and trying to load a trial code, the following error is generated:

"CORTEX_M4_0: Error connecting to the target: (Error -121 @ 0x0) A bad controller handle has been given to a function, either before attempting to open the controller, or after having opened the controller and ignored its error status. Valid controller handles are generated when attempts to open the controller return a clean error status. (Emulation package 5.1.641.0)"

Later on, now im getting the error "Error connecting to the target:
(Error -1170 @ 0x0)
Unable to access the DAP. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK).
(Emulation package 0.0.0.0)"

Request you kind support for getting the board up.

  • Hi Shijin,

    I suppose you are using an external XDS110 debug probe, correct? In CCS you can do a JTAG connection test. Go to the target connection file and you should see the connection test button. Try to run it and what is the report? Please also probe the JTAG interface on TCK, TMS, TDI and TDO. Do you see proper signals on these signals?

    Please also check if you have proper pullup on the TCK, TMS and TDI pins. Below are two app notes which contain information about JTAG interface hardware consideration.

    section 4 of www.ti.com/.../spma075.pdf
    section 3.7 of www.ti.com/.../spma056.pdf
  • Hello Charles.

    Thanks a lot for your support.
    I have checked the hardware and changed the TDO to pull low through 10k resistor. But no improvement. I have TM4C129X development board. I tried with that too, but did not succeed.

    This gives below error in CCS:

    "CS_DAP_0: Error connecting to the target: (Error -1170 @ 0x0) Unable to access the DAP. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 0.0.0.0) "


    Im using XDS100v2 debugger. Below is the report which says JTAG integrity test failed.

    Thank you once again for support.

    [Start]

    Execute the command:

    %ccs_base%/common/uscif/dbgjtag -f %boarddatafile% -rv -o -F inform,logfile=yes -S pathlength -S integrity

    [Result]


    -----[Print the board config pathname(s)]------------------------------------

    C:\Users\Admin\AppData\Local\TEXASI~1\CCS\
    ti\0\0\BrdDat\testBoard.dat

    -----[Print the reset-command software log-file]-----------------------------

    This utility has selected a 100- or 510-class product.
    This utility will load the adapter 'jioserdesusb.dll'.
    The library build date was 'Feb 18 2015'.
    The library build time was '23:56:50'.
    The library package version is '5.1.641.0'.
    The library component version is '35.34.40.0'.
    The controller does not use a programmable FPGA.
    The controller has a version number of '4' (0x00000004).
    The controller has an insertion length of '0' (0x00000000).
    This utility will attempt to reset the controller.
    This utility has successfully reset the controller.

    -----[Print the reset-command hardware log-file]-----------------------------

    The scan-path will be reset by toggling the JTAG TRST signal.
    The controller is the FTDI FT2232 with USB interface.
    The link from controller to target is direct (without cable).
    The software is configured for FTDI FT2232 features.
    The controller cannot monitor the value on the EMU[0] pin.
    The controller cannot monitor the value on the EMU[1] pin.
    The controller cannot control the timing on output pins.
    The controller cannot control the timing on input pins.
    The scan-path link-delay has been set to exactly '0' (0x0000).

    -----[The log-file for the JTAG TCLK output generated from the PLL]----------

    There is no hardware for programming the JTAG TCLK frequency.

    -----[Measure the source and frequency of the final JTAG TCLKR input]--------

    There is no hardware for measuring the JTAG TCLK frequency.

    -----[Perform the standard path-length test on the JTAG IR and DR]-----------

    This path-length test uses blocks of 512 32-bit words.

    The test for the JTAG IR instruction path-length failed.
    The JTAG IR instruction scan-path is stuck-at-ones.

    The test for the JTAG DR bypass path-length failed.
    The JTAG DR bypass scan-path is stuck-at-ones.

    -----[Perform the Integrity scan-test on the JTAG IR]------------------------

    This test will use blocks of 512 32-bit words.
    This test will be applied just once.

    Do a test using 0xFFFFFFFF.
    Test 1 Word 0: scanned out 0xFFFFFFFF and scanned in 0xFFFFFFF1.
    Scan tests: 1, skipped: 0, failed: 1
    Do a test using 0x00000000.
    Test 2 Word 0: scanned out 0x00000000 and scanned in 0xFFFFFFFF.
    Test 2 Word 1: scanned out 0x00000000 and scanned in 0xFFFFFFFF.
    Test 2 Word 2: scanned out 0x00000000 and scanned in 0xFFFFFFFF.
    Test 2 Word 3: scanned out 0x00000000 and scanned in 0xFFFFFFFF.
    Test 2 Word 4: scanned out 0x00000000 and scanned in 0xFFFFFFFF.
    Test 2 Word 5: scanned out 0x00000000 and scanned in 0xFFFFFFFF.
    Test 2 Word 6: scanned out 0x00000000 and scanned in 0xFFFFFFFF.
    The details of the first 8 errors have been provided.
    The utility will now report only the count of failed tests.
    Scan tests: 2, skipped: 0, failed: 2
    Do a test using 0xFE03E0E2.
    Scan tests: 3, skipped: 0, failed: 3
    Do a test using 0x01FC1F1D.
    Scan tests: 4, skipped: 0, failed: 4
    Do a test using 0x5533CCAA.
    Scan tests: 5, skipped: 0, failed: 5
    Do a test using 0xAACC3355.
    Scan tests: 6, skipped: 0, failed: 6
    Some of the values were corrupted - 83.4 percent.

    The JTAG IR Integrity scan-test has failed.

    -----[Perform the Integrity scan-test on the JTAG DR]------------------------

    This test will use blocks of 512 32-bit words.
    This test will be applied just once.

    Do a test using 0xFFFFFFFF.
    Test 1 Word 0: scanned out 0xFFFFFFFF and scanned in 0xFFFFFFFE.
    Scan tests: 1, skipped: 0, failed: 1
    Do a test using 0x00000000.
    Test 2 Word 0: scanned out 0x00000000 and scanned in 0xFFFFFFFF.
    Test 2 Word 1: scanned out 0x00000000 and scanned in 0xFFFFFFFF.
    Test 2 Word 2: scanned out 0x00000000 and scanned in 0xFFFFFFFF.
    Test 2 Word 3: scanned out 0x00000000 and scanned in 0xFFFFFFFF.
    Test 2 Word 4: scanned out 0x00000000 and scanned in 0xFFFFFFFF.
    Test 2 Word 5: scanned out 0x00000000 and scanned in 0xFFFFFFFF.
    Test 2 Word 6: scanned out 0x00000000 and scanned in 0xFFFFFFFF.
    The details of the first 8 errors have been provided.
    The utility will now report only the count of failed tests.
    Scan tests: 2, skipped: 0, failed: 2
    Do a test using 0xFE03E0E2.
    Scan tests: 3, skipped: 0, failed: 3
    Do a test using 0x01FC1F1D.
    Scan tests: 4, skipped: 0, failed: 4
    Do a test using 0x5533CCAA.
    Scan tests: 5, skipped: 0, failed: 5
    Do a test using 0xAACC3355.
    Scan tests: 6, skipped: 0, failed: 6
    Some of the values were corrupted - 83.4 percent.

    The JTAG DR Integrity scan-test has failed.

    [End]

  • Hello Charles and Team,

    Today I had some progress. In the schematics, the controller wake up pin connection to ground was not good.

    I have connected the wake up pin to ground. Now the JTAG test function gets successful.

    But still, when I try to dump the code to the custom board, I get the error below:

    "Error connecting to the target:
    (Error -121 @ 0x0)
    A bad controller handle has been given to a function,
    either before attempting to open the controller, or after
    having opened the controller and ignored its error status.
    Valid controller handles are generated when attempts
    to open the controller return a clean error status.
    (Emulation package 5.1.641.0)"

    Im using XDS100V2 debugger and the code that i was trying to use was the "hello world" example right from the project creation window to ensure the code gets loaded in the controller.

    #include <stdio.h>

    /*
     * hello.c
     */
    int main(void) {
        printf("Hello World!\n");
        
        return 0;
    }

    Request your support.

    Thank you

    Regards

    Shijin

  • Hello Charles and Team,

    The issue got resolved. It was due to

    1 . The wake up pin was floating which was a mistake in our design.

    2. The reset pin, was not pulled up properly from watchdog timer chip.

    Thanks for your support.

    Regards

    Shijin.

  • Hi Shijin,
    Thanks for the update. Please also refer to the system design guidelines as a precaution for potential hardware issues. www.ti.com/.../spma056.pdf
  • Thank you. I will go through this document.

    Regards
    Shijin
  • Review of one of your (very) early posts here reveals:

    " -----[Perform the Integrity scan-test on the JTAG IR]------------------------

    This test will use blocks of 512 32-bit words.

    This test will be applied just once.

    Do a test using 0xFFFFFFFF.

    Test 1 Word 0: scanned out 0xFFFFFFFF and scanned in 0xFFFFFFF1.      Note - only the FINAL NIBBLE w/in this (very first) word was corrupted!)

    Scan tests: 1, skipped: 0, failed: 1

    Do a test using 0x00000000.

    Test 2 Word 0: scanned out 0x00000000 and scanned in 0xFFFFFFFF.

    Test 2 Word 1: scanned out 0x00000000 and scanned in 0xFFFFFFFF.

    Test 2 Word 2: scanned out 0x00000000 and scanned in 0xFFFFFFFF.

    Test 2 Word 3: scanned out 0x00000000 and scanned in 0xFFFFFFFF.

    Test 2 Word 4: scanned out 0x00000000 and scanned in 0xFFFFFFFF.

    Test 2 Word 5: scanned out 0x00000000 and scanned in 0xFFFFFFFF.

    Test 2 Word 6: scanned out 0x00000000 and scanned in 0xFFFFFFFF. "

    I would think that "continuing the test - employing the same test value (0xFFFFFFFF)" would have proved more insightful.     Such would reveal the possible "failure based upon time" which may direct one to the (internal) or (external in this case) watchdog performance.    Its noted that such test is (likely) automated - and "beyond poster's control" - yet the SUDDEN SHIFT from (only a nibble error) to (everything in sight in error) rings a rather "loud" alarm bell...    (which even, "Little Stevie Wonder could hear...and sing!")