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.

Error -2062 when programming a TM4C129XNCZAD processor, what does it mean?

Other Parts Discussed in Thread: TM4C129XNCZAD, UNIFLASH, TM4C129ENCPDT

I am using the Black Hawk XDS100v2 JTAG emulator to program a TM4C129XNCZAD processor on a custom board and it is giving the following error in CCS 6.01:

CORTEX_M4_0: GEL Output:

Memory Map Initialization Complete

CORTEX_M4_0: Error connecting to the target: (Error -2062 @ 0x0) Unable to halt device. 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 5.1.635.0)

 Does anyone know what that error -2062 means?

I have used the "Test Connection" utility in CCS and it passes the test.

I have gone through the debugging at http://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/t/374640 “ISSUE #3” and have not found any problems. See details below.

1. Main Oscillator is mounted and soldered down well. It has a well shaped 25MHz sin wave on each side.

2. If not using Main Oscillator then ensure OSC0 pin is connected to GND. Not applicable.

3. The Decap on VDDC should be in the range of 2.2uF to 4.7uF. Clean 1.2V signal, following Caps connected to gnd in parallel: 2.2uF, 1.0uF, 0.1uF, 0.01uF.

4. The RST_N Pin is Pulled High to VDD Supply. Pulled high with 10K resistor.

5. The JTAG Has Pull Up's as well (this is always a good to have in case of custom board layout). 10K resistor to 3.3V for all 4 JTAG lines

I can program the EK-TM4C129XL using the same Black Hawk XDS100v2 programmer.

I have lowered the JTAG programming speed to 100kHz (and other slower speeds) and it gives the same error.

  • Hello Steven,

    What is RBIAS pin on the TM4C129XNCZAD connected to? If not to a Resistor of 4.89K, then that is the problem... (have quite a few posts in the forum on the same)

    Regards
    Amit
  • Hi Steven
    I think the JTAG TCK pin has to have a PULL low, 10K resistor to GND. Please confirm if that.

     Regards

    Aquino

  • I have the JTAG TCK pin Pulled high through a 10K resistor to 3.3V as suggested at http://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/t/374640 “ISSUE #3” . According to System Design Guidelines for the TM4C129x Family of Tiva™ C Series Microcontrollers (SPMA056–October 2013) TCK should be
    externally pulled-up with a 10K or stronger resistor or pulled-down with a 1K or stronger resistor to prevent
    any transitions that could unexpectedly execute a JTAG instruction.
  • Hello Steven,

    What about RBIAS pin? Can you please share the schematic?

    Regards
    Amit
  • RBIAS is open. We are not using the Ethernet. Is it needed for jtag programming? We will add it to the design and see what happens.
  • Hello Steven

    That is the problem. With a 25MHz crystal the ROM Boot Loader on an empty PHY enabled device will activate the PHY. If RBIAS is not connected the PHY will not be correctly powered and would cause the issue. We have seen the same and it is mentioned in the data sheet as well in the foot note for Boot Loaders... I have run into this issue, so I can 99.99% be sure that it is the same issue.

    Regards
    Amit
  • We were able to program it by grounding the 25MHz crystal to put a new program on it. We then reconnected the crystal and it works as expected. We will add the RBIAS resistor in our next board rev.

    Thanks Amit !

  • We added the RBIAS resistor on our new board rev and we are getting the same -2062 error. Should the RBIAS resistor measure near ground on both sides? I was able to fix the problem by grounding E19 (OSC 0) the first time I programmed it (OSC 0 needs to be grounded at power up) (You may also need to slow down the programmer speed to 100kHz when OSC 0 was grounded.). Now that the default Ethernet bootloader is no longer in the TM4C129X it programs properly at the default 1MHz programming speed and the 25MHz crystal.

    Below is the schematic of the processor connections. Please let me know what is missing/wrong for it to program with the default boot loader the chip is shipped with.

    Thanks,

    Steve

  • Hello Steve,

    The schematic is not there in the post. The RBIAS is used to generate the reference current for the internal LDO.

    Regards
    Amit
  • I pasted it in using the Insert/Edit media button and computer upload function. See above post that has been edited to add the schematic.

  • Hello Steven,

    Click "Use rich formatting" on bottom right of the reply box, drap and drop the image.

    Regards
    Amit
  • I posted it above.

  • Hello Steven,

    Thanks, now I see it. The schematic looks correct.

    What is the boot loader interface you are using? You did mention that JTAG works at 1MHz.

    Regards
    Amit
  • I am using the Black Hawk XDS100v2 JTAG emulator to program the TM4C129XNCZAD from CCS 6.01
  • Hello Steven

    Steven Wallcave said:
    Now that the default Ethernet bootloader is no longer in the TM4C129X it programs properly at the default 1MHz programming speed and the 25MHz crystal.

    The JTAG is working, that is what you said!!!

    Steven Wallcave said:
    We added the RBIAS resistor on our new board rev and we are getting the same -2062 error.

    So how are you getting the JTAG error?

    Regards

    Amit

  • When the TM4C129X chip comes from the factory it will not program unless the board is powered up with OSC 0 (25MHz crystal) grounded. Once it has been programmed for the first time it works normally. I assume this is because the factory installed boot loader somehow gets stuck with a 25MHz crystal.
  • Hello Steven,

    There is not boot loader in the Flash when devices are shipped. There is only the ROM Based boot loader. Now if you erase the flash and power cycle the board, it should show the same behavior as a fresh part.

    If it is does then we can narrow down on some possible issues.

    If it does not then this would be worth the debug.

    Regards
    Amit
  • How can I erase the flash using the Black Hawk XDS100v2 JTAG emulator in CCS 6.01?

  • Hello Steven

    You can use UNIFLASH to do the same.

    Regards
    Amit.
  • After using Uniflash to clear ram it behaved like a new part (not able to program unless 25MHz crystal is grounded at power up).
  • Hello Steven,

    That is good news: The issue is now reproducible. I tried doing an experiment on my side and it seems that if RBIAS is not connected then I cannot use JTAG either. You may want to check if the RBIAS pin is actually connected well to the resistor. Alternatively, since this is a QFP package, there is a GND pin next to the RBIAS pin. Can you short the RBIAS pin to the GND and check if the JTAG works.

    Regards
    Amit
  • Unfortunately it is a BGA package so I can not measure the pins directly. I can measure both sides of R555 the 4.87K resistor connected between RBIAS (pin W15) and gnd. What voltage should the RBIAS resistor measure?
  • Hello Steven,

    The voltage readout does not happen on the pin with a DMM. However when powered the resistor reads ~1.18K while unpowered it reads 4.88K. Can you check the resistance for both powered and unpowered?

    Regards
    Amit
  • I get a different reading that varies with time. I think an ohm meter reading on an active circuit would change depending on which ohm meter you are using.
  • Hello Steven

    Yes, that is true (didn't realize until I hit "Reply".. Apologies). And the voltmeter showed 0V on both sides when the device is returned to the Factory condition of full Flash erase. What does it show for your board?

    Regards
    Amit
  • I also get 0V on both sides.
  • Hello Steven

    Do you have a 16MHz crystal that you can replace the 25Mhz crystal with. The reason I am asking this that if the RBIAS is not connected to GND, then I can replicate the issue. With a 16MHz oscillator I am able to work with the JTAG.

    This will help tell us if the RBIAS pin is connected to the resistor correctly. If even after doing so it does not work, then may be you would have to try replace the part and send the device over to TI for FA.

    Regards
    Amit
  • I can ground out the 25MHz crystal (pin E19-OSC0) at power up so it uses the Precision Internal Oscillator (PIOSC) which I believe is at 16MHz. I can program the JTAG then.

    Do any other Ethernet pins need to be terminated or pulled up to Vcc other than RBIAS?
  • Hello Steven,

    No there is no such requirement for the other ethernet pins. But grounding 25MHz may not be a viable solution for factory programming. I think we need to get to the root cause as to why the device is still not working when flash is erased and RBIAS is "well" connected.

    Regards
    Amit
  • I agree. What is the best way to proceed? We are having the same problem with both boards we have built up. The circuit board manufacturer did an electrical netlist test that certifies that W15 and R555 (and all other nets) are connected with less than 10 ohms of resistance between them and more than 10megohm of isolation resistance (per IPC 6012, class 2). We confirmed that W15 and R555 are connected together on the same net and are the only things on that net.
  • Hello Steven,

    Since you have already pasted the schematic, I can try to see how much board mod I can make on my side to replicate the issue. The debugger is a XDS100V2 ARM, is that right?

    In the meantime please do try the 16MHz option, as it will be a crucial data point for us.

    Regards
    Amit
  • Correct I am using a Black Hawk XDS100v2 JTAG emulator.
    I do not have a 16MHz crystal. How is this different from using the Precision Internal Oscillator (PIOSC) which operates at 16MHz?

    Thanks,
    Steve
  • Hello Steven,

    Compared to an external oscillator the PIOSC has a larger frequency variation band over PVT. While it can enable the device to work with the PLL, for jitter sensitive applications like USB and asynchronous interfaces like UART it is not a good clock source over PVT.

    Regards
    Amit
  • Steven Wallcave said:
    According to System Design Guidelines for the TM4C129x Family of Tiva™ C Series Microcontrollers (SPMA056–October 2013) TCK should be
    externally pulled-up with a 10K or stronger resistor or pulled-down with a 1K or stronger resistor to prevent
    any transitions that could unexpectedly execute a JTAG instruction

     Hi Amit, about JTAG, yes it is not uC related, I also used a pull down resistor I think I see somewhere on early documentation as guide line and is close latest FPGA i am using, generally also on FPGA I am used to pull down TCK than pullup, has TIVA internal pullup need to be overridden? Next release I change me too all pullup on all JTAG but just to have an idea, the early board probably remain as they are (0402 resistor are in place) on stronger values I think 330 Ohm can be lower and 220 limit drive of many logic.

     From Altera Application:

    The TDI and TMS pins have internal weak pull-up resistors, while the TCK pin has an internal weak pull-
    down resistor. However, for device programming in a JTAG chain, there might be devices that do not
    have internal pull-up or pull-down resistors. Altera recommends to pull the TMS signal high externally
    through 10-kΩ and the TCK signal low through 1-kΩ resistors. Pulling up the TDI signal externally for the
    device is optional.

     Xilinx recommend high but I have not found nothing about internal JTAG, I am no more using them from  where I switched to MSP.

     Xjtag recommend just terminate with 68Ohm resistor in series with a decoupling capacitor:

    http://www.xjtag.com/support-jtag/dft-guidelines.php

    and from JTAG seems many application exists vendor specifics...

    http://www.jtag.com/en/knowledge-base

     Amit what to do with pin, I leave pull down as is also if probably it is a 10KOhm or it is better use a pullup some hint about internal then edit recommend on sticky if necessary.

  • Hello Roberto,

    Yes there is quite some confusion on the JTAG TDO Pull Condition. Pull Up or Pull Down, one thing they all agree is that a Pull is required. The internal pull up resistor is a very weak pull up, so if an external resistor is put, then a Pull Up would be preferred as it not only works with the internal pull up but also makes it stronger.

    Regards
    Amit
  • Hi Amit, TDO has no problem at all, pull up is not necessary, the pin under investigation can create troubles it is clock, where someone recommend pullup, someone recommend pull down but TIVA on TCK has weak pullup, weak pull down or simply nothing?
    JTAG say nothing about TCK.
  • Hello Roberto,

    Safe to have the Pull on the JTAG line. The TDO is significant when it is a daisy chain of devices. Some devices may actually move into the wrong state.

    Regards
    Amit
  • Hi Amit, sorry, the questionable pin is TCK, TDI/TDO are not really involved than if have different function on TIVA, this is what was for me on the past, I found forever instruction to leave clk low, I see from latest xilinx also suggest drive high but is addressed as temporary error.
    From TIVA document I inferred to use low drive, from again Altera:
    The TMS signal is pulled high so that the test access port (TAP) controller remains in the TEST_LOGIC or
    RESET state even if there is input from TCK signal. During power up, you must pull the TCK signal low to
    prevent the TCK signal from pulsing high. Pulling the TCK signal high is not recommended because the
    increase in power supply to the pull-up resistor causes the TCK signal to pulse high; therefore, it is possible
    for the TAP controller to reach an unintended state.

    TIVA on TMS TCK clock has weak pull to one of power rail? if yes where these pin are pulled?
  • Hello Roberto

    The TCK pin is pulled to high internal to the pad. You remember the GPIO_PUR register. The reset value of this register for the JTAG pins is 1. That is what pulls it to high. However in the beginning as the device is powered up the registers are in metastable state. However the JTAG state machine is connected to the same POR reset as the registers which control the pull. So effectively the state machine will remain in reset state. However as the reset is released then it could be possible for the state machine to move one state if it's reset is released earlier as it may see the JTAG TCK going from low to high. This is counteracted by the JTAG state machine by the TMS which will keep it in the idle state. Also the Pad reset is also toggled by the emulator which will ensure that the state machine goes back to the reset state.

    Regards
    Amit
  • Hi Amit,

    I am using a Black Hawk XDS100v2 JTAG emulator. I just got a blank board and have confirmed that pin W15 (RBIAS) is connected to R555, a 4.87k resistor to gnd. Have you made any progress on why the device is still not working when flash is erased and RBIAS is "well" connected?

    Thanks,
    Steve

  • Hello Steve,

    I had checked it on a custom board with TM4C129XNCZAD with a XDS100V2 ARM JTAG emulator and it is working fine with RBIAS and 25MHz crystal connected. I think the only way now to solve it is

    1. Can you run the JTAG Test Connection with XDS100v2 in CCS to see if the JTAG chain integrity from inside the device is correct?
    2. Send us your CCS Project ccxml file so that we can try to at least see if there is some setting issue?

    Regards
    Amit
  • I have used the "Test Connection" utility in CCS and it passes the test.

    Below is the text from TM4C129XNCZAD.ccxml

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <configurations XML_version="1.2" id="configurations_0">
    <configuration XML_version="1.2" id="Texas Instruments XDS100v2 USB Debug Probe_0">
            <instance XML_version="1.2" desc="Texas Instruments XDS100v2 USB Debug Probe_0" href="connections/TIXDS100v2_Connection.xml" id="Texas Instruments XDS100v2 USB Debug Probe_0" xml="TIXDS100v2_Connection.xml" xmlpath="connections"/>
            <connection XML_version="1.2" id="Texas Instruments XDS100v2 USB Debug Probe_0">
                <instance XML_version="1.2" href="drivers/tixds100v2cs_dap.xml" id="drivers" xml="tixds100v2cs_dap.xml" xmlpath="drivers"/>
                <instance XML_version="1.2" href="drivers/tixds100v2cortexM.xml" id="drivers" xml="tixds100v2cortexM.xml" xmlpath="drivers"/>
                <platform XML_version="1.2" id="platform_0">
                    <instance XML_version="1.2" desc="Tiva TM4C129XNCZAD_0" href="devices/tm4c129xnczad.xml" id="Tiva TM4C129XNCZAD_0" xml="tm4c129xnczad.xml" xmlpath="devices"/>
                </platform>
            </connection>
        </configuration>
    </configurations>

    Thanks,

    Steve

  • Hello Steve

    The ccxml file also checked out without any issues. I think we would need to have a debug session (and then bring back the details to the forum)

    Regards
    Amit
  • A debug session sounds good. How do we do that?
    Thanks,
    Steve
  • I was finally able to build up a board with a 16MHz crystal. An erased processor programs and works correctly. We have not solved why an erased processor does not program with a 25MHz crystal. (As a reminder, I can program an erased processor with the 25MHz crystal by grounding out one of the crystal pins. Once a processor with the 25MHz crystal has a working program it can be reprogrammed )


    Thanks,

    Steve

  • Hello Steven,

    I checked with a few other folks and all of them confirmed that 25MHz w/o RBIAS gives the same issue as what you reported. And the board works fine when the RBIAS is connected. I know that you did mention earlier that on a new board you could check that RBIAS is connected well, but for some reason I am not able to think other than that since all ref platforms work well with RBIAS and not well w/o RBIAS.

    Regards
    Amit
  • The tested board layout has an RBIAS resistor of 4.87K from pin W15 to GND. This has been confirmed on a unpopulated board by manually measuring pin W15 to the resistor pad and the other resistor pad to ground, as well as the board manufacturers automated tests. I also measured 4.86K ohm on a populated board across the resistor.
  • Hello Steven

    I trust you with the measurements, but not having seen such an issue with all connections corrected and not having your board either does not give me any clue to debug with,

    Regards
    Amit
  • How do you suggest we proceed?
  • I also got the error - 2062 message when I try to program a brand new chip unless I ground the OSC0 pin. The problem is we didn't need to do so before. Is there a reason we have to ground OSC0 when programming a brand new Tiva now?