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/TM4C129XNCZAD: Keep getting FaultISR most times I debug the program

Part Number: TM4C129XNCZAD


Tool/software: Code Composer Studio

I'm running:

- MacOS Sierra 10.12
- CCS 7.0.0
- TM4C129XNCZAD 

When I run a specific program, a custom program we have for TM4C129X board, it doesn't run and gets a Hard Fault, probably a bus fault and goes to FaultISR().

This happens most times, but every now and then, my code runs fine which is more frustrating than not working all the time.

What do you think could be the issue? Also, problem has been that my CCS 7.0.0 frequently and continually crashes after every other build or so. I saw another discussion about the patch, I've applied said patch but it has not helped in alleviating my issues. Any help would be great, thanks.

  • Hmmmm, not really much specific info.

    Perhaps a stack overflow, or an "illegal" memory access, like an array index out of bound. Do you use the FPU, and if yes where (main code / interrupts). How many interrupts, and how priorized ?

    I suggest two options. Either set a breakpoint in the hardfault handler (possibly propping it up with some auxiliary code), and run the code in the debugger until a "crash". Then, inspect the SCB registers, to figure out the reason. You will probably need the map file to deduce from addresses (as found in the SCB regs) to your routines.

    The second option would be to instrumentalize your code with debug outputs, and trace the debug outputs. Most probably you need to incrementally narrow down on the offending code. You can use the trace option of your debug pod (if available), or a free UART.

  • Take a look at this post, particularly item #7:
    e2e.ti.com/.../374640
    The post references this application note that provides some good information on identifying the cause of the fault.
    www.ti.com/.../spma043