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.

CORTEX_M4_0: Trouble Halting Target CPU

Other Parts Discussed in Thread: TM4C123GH6PGE

Hi,

I sometimes get this message "CORTEX_M4_0: Trouble Halting Target CPU" when I press the Pause button during a Debug session.

Does anybody know what could cause this as it prevents me from debugging the code to find out what is wrong!

I'm using a TM4C123GH6PGE on a custom board and I'm using a Launchpad as the debugger.

Thanks

Richard

  • Sorry forgot to say I'm using CCS v5.5!
  • Hello Richard

    What is the System Frequency and JTAG Clock Frequency? Since you mentioned it is sometimes, I suspect that the debugger is working faster than 1/10 of the System Clock?

    Regards
    Amit
  • Hi Amit,
    Thanks for getting back to me so quickly!
    This is the code I use for setting the System Frequency
    ROM_SysCtlClockSet(SYSCTL_SYSDIV_4 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_25MHZ);
    I'm not sure about the JTAG Clock Frequency - where is that set?
    More info...
    I'm trying to diagnose a system power-up issue. My board is connected to a host (Linux) via a UART. So I power-up and start the debugger immediately. The debugger is running before the Linux has finished booting. I wait for the host to start - it is then I can't press my debugger Pause (Trouble Halting CPU). If I then stop the debugger and restart it, it works fine.
    Any ideas?
    Thanks
    Richard
  • Hello Richard,

    Then it may not be the JTAG Clock Frequency as the issue is reproducible. For me to able to process the data, what do you mean by Linux has finished booting. The debugger is JTAG and if the UART is running that means Linux host is working.

    Regards
    Amit
  • Hi Amit,
    Sorry I may not have described the situation clearly.
    My board is a peripheral to the Linux host. It all powers-up together, but Linux takes about 20 seconds to finish booting so I have time to start the debugger before Linux starts, hopefully replicating what happens under normal power-up (without the debugger).
    I was hoping to be able to pause the debugger to find out what was going on in the Tiva at this point, but the pause doesn't work.
    I'm sure I can use other techniques (toggling pins) to find out more, but it takes longer of course!
    Best regards
    Richard

  • Hello Richard,

    1. How is power being applied?
    2. Where is the JTAG-IDE connected to: the Linux Host or another Always On host?

    Regards
    Amit
  • Hi Amit,
    Power is mains to the Linux host and my peripheral board.
    The Debugger is running on another always powered Windows PC.
    Richard

  • Hello Richard,

    My suspicion would be that the system is getting another POR reset. I would have to run the TM4C123 of an always on power supply to make sure that the TM4C123 does not get powered down while the debugger is connected.

    Regards
    Amit
  • OK that's something I'll try tomorrow morning - I'll let you know.
    Thanks for all your help.
    Richard

  • Dear Amit, you are absolutely right - the host was (wrongly) signalling an extra hardware reset to my board. Having rigged up a separate power supply for my board the problem persisted but a 'scope on the reset line showed up the error.
    Many thanks for your insight - sometimes it's hard to spot the obvious when you're deep into a project!
    Best regards,
    Richard
  • Hello Richard

    Glad to know it solved the issue. Ran into one to suspect one...

    Regards
    Amit