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.

Debugging Interrupts on C6711



How can interrupt code be debugged?

I'm trying to get interrupts working on a C6711D. I have an Interrupt service table and am pointing to it via the ISTP register. When the code that enables the hardware to generate an interrupt is executed, the CPU locks up and the debugger is put in a state where I have to stop debugging, power cycle the CPU, restart debugging, and reset the CPU through the debugger.

Putting breakpoints in the interrupt service table or the C language "interrupt" declared function that is supposed to be called when the interrupt is handled does not work, the debugger will not break, it is completely hosed.

What are the rules on using breakpoints for interrupt debugging?

Should they work, or is this beyond the capability of the CPU/Debugger?

 

  • Hi Paul,

    Their is no specific rule to debug interrupt handler/routine, it follows normal procedure only .

    The way we set breakpoints on any other place in a program, we can set breakpoints in interrupt routine also.

    Also You can tweak some of Debug settings from project properties - > Debug section itself.

    Also checkout below Debugging Wiki's for CCS

    http://processors.wiki.ti.com/index.php/Debug_Handbook_for_CCS

  • Paul,

    Start with the easy things, like doubling or tripling your stack space.

    You will have to share more about what the C6711D is doing in the application, the nature of the interrupt, timing of the interrupt, how many other interrupts, etc.

    You are pretty deep into the application, so you will probably need to step back a lot to figure out what is happening in your system.

    Paul Nicholson said:
    Putting breakpoints in the interrupt service table or the C language "interrupt" declared function that is supposed to be called when the interrupt is handled does not work, the debugger will not break, it is completely hosed.

    Breakpoints will work if they are set prior to the processor getting lost. 

    Paul Nicholson said:
    What are the rules on using breakpoints for interrupt debugging?

    There is no difference to the internal emulation logic nor CCS as to whether a breakpoint is placed in an ISR or in regular code. The other details of your system and application dictate the rules. For example on a hard disk drive, if you set a breakpoint anywhere, the heads will crash.

    Regards,
    RandyP

  • It's working now. Kinda embarrassing what was wrong - not enough zeroes behind the 8 in the hex number that was set in the interrupt vector table register.

  • Paul,

    Tough job finding things like this, so you did some good detective work.

    Thanks for letting us know.

    Regards,
    RandyP