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.

FaultISR, but where did it happen?

Other Parts Discussed in Thread: EK-TM4C1294XL

Hi there,

I am using the Tiva C Series Connected Launchpad EK-TM4C1294XL. Sometimes I run into the problem that my program hangs in the FaultISR interrupt but I don't know when and why this happened. Is it possible to step back in the debugger to find the line of code where the interrupt was triggered? Or do I always have to step through the whole program to find the faulty code? The problem is that sometimes specific parts of the code have to run with normal speed, so I can not simply step through it slowly.

Thank you!

  • Hi Nicolas,

    Check Amit's sticky post "Diagnosing Common Development Problems and Tips for TM4C Devices", issue #6 has a link to a PDF detailing the procedure of (possibly) finding the culprit. FaultISR can be triggered multiple ways, the most common (and easiest to debug/fix) is accessing peripheral registers without said peripheral having been enabled prior to accessing. Also a quite common "fault-source" is accessing uninitialized (or null) pointers (not that I'd have any experience on that, no no, not me...)

    When you have FaultISRs triggering every now and then, and seemingly from random locations, that might also be a sign of stack corruption and/or stack overflow.

    HTH,

    Veikko

  • Thank you! I found the error. I forgot to call PinoutSet(false, false).
  • Nicolas Göddel said:
    Sometimes I run into the problem that my program hangs in the FaultISR interrupt

    While you report that "PinoutSet(false, false)" was the villain - how do you explain that (sometimes) your program ran correctly?      Does it not seem likely - that the absence of that function - would raise the "program hangs" to a rate higher than, "sometimes?"

    Veikko gave you a solid diagnostic "procedure" - this "answer" seems not to rise to that status...

  • In this project the programm always runs into FaultISR, if started normally. If I step through the code with the debugger the FaultISR was not triggered.

    "Sometimes" refer to all my other projects together. In that one project the solution was simply "PinoutSet(false, false)".

  • Nicolas Göddel said:
    "Sometimes" refer to all my other projects together

    The arrival of that (bit critical) data indeed explains your issue.     Thanks et bon chance,, mon ami.