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.

TM4C123 programming suddenly failing

Other Parts Discussed in Thread: TM4C123GH6PZ, LMFLASHPROGRAMMER

Hello - 

I have a TM4C123GH6PZ unit on a custom board.  I'm suddenly unable to program it.  

It worked fine for few months, until today.

CORTEX_M4_1: Flash Programmer: Erasing flash contents timed out!
CORTEX_M4_1: Flash Programmer: Timed out while writing to Flash memory
CORTEX_M4_1: GEL: File: C:\work_cc6\XXX_ARM_M4_CCS\Debug\XXX_Arm_M4_CCS.out: Load failed.
CORTEX_M4_1: Unable to terminate memory download: NULL buffer pointer at 0x3a9

Some notes:

1.  I tried to program a unit on a different (but same configuration) board, and it worked fine.

2. I tried to do the "Debug Port Unlock" procedure.  It seemed to work fine but didn't solve the problem.

3. I'm able to connect to the target using JTAG.

 

Technical info:

Unit used:  TM4C123GH6PZ

XTAL freq:  20MHz,   Sysclk freq: 40Mhz

Dev Tool:  CCS 6.0.0.00156

JTAG Emulator:  XDS100V2

JTAG Freq: 1Mhz

 

Any possible solution ?  

 

Thanks,

Tal

 

 

 

  • HI Tal Katzir ,

    When that kind of error apears i usualy use LM Flash Programmer to completely erase the flash and reset the MCU

  • Hi Luis - 

    I tried to do this via CCS on chip flash tool and failed.  (same issue).

    I don't have an interface on my board that allows me to use LM programmer.  Does it do anything different than

    CCS flash tool?

    Tal

  • Tal Katzir said:

    1.  I tried to program a unit on a different (but same configuration) board, and it worked fine.

    2. I tried to do the "Debug Port Unlock" procedure.  It seemed to work fine but didn't solve the problem.

    You have to do a board level Failure Analysis. Check first the immediate components that makes the Tiva microcontroller work like power supply, crystal oscillator and others.

    - kel

  • Hi Tal,

    I have never used the CCS on chip flash tool. Try using the LM programmer, maybe it will help. http://www.ti.com/tool/lmflashprogrammer

  • Hi Markel - 

    We have several other micro-controllers on this board.  All getting the same clock and power source.  All working OK except the Tiva  unit.   Also,  I'm able to establish connection to the Tiva unit using JTAG.  However, all flash related operations are failing.

    Thanks,

    Tal

  • Hi Tal,

         You have several custom boards with Tiva microcontroller running with the same firmware, and then this specific board has flash related operations failure. This seems like a board problem.

          Like what I have replied earlier, you need to do a board level Failure Analysis. You need to isolate the cause of this MCU flash operation failure. 

          But, if you or your group is unable to do a very good Failure Analysis job now, then move on to other boards. Schedule the Failure Analysis of this board with MCU flash operation failure at another schedule.

          Failure Analysis needs to be done methodologically. Similar to what a doctor would do to a sick patient.

    -kel

  • Tal Katzir said:
    several other micros on this board...all getting the same clock and power source.

    Might those items (in highlight, above) provide a likely clue?  When in program mode - might the power requirements increase - and perhaps exceed the power you're supplying?  Have you monitored the 3V3 rail with a scope - set to capture any voltage dips?

    Unknown if you're relying upon MCU's internal (weak ~60-70K iirc) JTAG pull-ups.  As you share (at minimum) the JTAG clock (I suspect the data, too) the added capacitance may place your JTAG signals at a, "ragged edge" - especially if you're using those (always suspect) internal pull-ups.  External 4K7 pull-ups surely will improve both signal levels & edges... 

    May prove useful to first monitor 3V3 for any dip - and if "good" I'd (temporarily) break any "shared" JTAG connections to your other board devices.  If the 3V3 is stable - suggest that you scope the JTAG signals @ the MCU - first when you, "just connect" - you state that works) and then again when you attempt to program.  Do those signals look the same - in both instances?

    And might you bit detail what you can do when you, "connect" via JTAG?  (I'm probing to insure that your JTAG @ your MCU really is up/running.)  KISS may well prove your friend...  (works so often for us...)

  • Hello Tal,

    A custom board sometimes overlooks some design reommendations (we have seen this in the past). In addition to what cb1 mentioned

    1. Are the VDDC decaps mounted as per the requirement of 2.2uF to 4.7uF

    2. Are there sufficient decaps on VDDS and VDDA Power supply

    3. Is the Reset Pin Pulled Up?

    4. If using an external crystal is the same soldered down properly or if not using then is OSC0 pin GND-ed?

    Regards

    Amit

  • The issue was resolved after replacing the Tiva unit.  I still don't have a clue what caused the previous unit to fail, but everything is OK right now.  

    Thanks for the responses.  We'll check all the possible issues mentioned here to raise our confidence that this will not happen again.

    Tal

  • Tal Katzir said:
    The issue was resolved after replacing the Tiva unit.  

    Possible solderability problem or problem within the Tiva microcontroller.

    If suspected solderability problem, an x-ray of the part would possibly reveal some solderability issues. If there are solderability problems then a re-heat of the part would probably solve the problem. But, since you already removed the part, that is not going to happen. Maybe applicable to the next problem custom board.

    If suspected problem within Tiva microcontroller, I suggest you send it back to TI for Failure Analysis.

    - kel