This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Single stepping while interrupts are enabled

Is there a setting in uVision 4 for the Silabs C51 processors that allow single stepping over interrupts while interrupts are enabled?

I have the ADC sampling 7 channels every 30mSec and when I put a breakpoint outside the ADC interrupt, everytime I single step I go into the ADC interrupt.

Basically I want to single step, and every single step, step over any pending interrupts and go to my next instruction.

Thanks
Mark

Parents
  • On a PC, you have the interrupts handled by the OS. So debuggers don't get affected by them when debugging application code.

    A debugger for a microcontroller really should have a similar function, where you can single-step without getting affected by the interrupt, as long as the code isn't reentrant and the ISR calls the same function as you are already debugging from main loop.

    It's a real pain to debug a microcontroller program if we for every step have to point at the target source line.

Reply
  • On a PC, you have the interrupts handled by the OS. So debuggers don't get affected by them when debugging application code.

    A debugger for a microcontroller really should have a similar function, where you can single-step without getting affected by the interrupt, as long as the code isn't reentrant and the ISR calls the same function as you are already debugging from main loop.

    It's a real pain to debug a microcontroller program if we for every step have to point at the target source line.

Children
  • This is true. And this is what is happening. It is a real pain to point to the line of code and select " run to line".

    I have used other debuggers in the past where "step over interrupt" was an option. If it was selected, then no matter what function I placed a breakpoint (inside or outside of an interrupt), I could single step. And with the single step the processor would service any pending ISR's (in the background) and step to the next line of code, as if the interrupt never happened.

    The point here is, I am not debugging or stepping through an interrupt. My breakpoint is in a while(1) in main, waiting for an event to happen. When the event happens, I stop at the breakpoint, but when I try to "step over" to the next instruction, I am immediately taking to the ADC completion interrupt. and then I have to either:

    - Step over all of the interrupt and hopefully get back to where I was before the interrupt

    or

    - Put a breakpoint on the next instruction in my while(1), run and then hit the next breakpoint. Then select each line and "run to this line"

    All I was asking was if there was a "step over interrupt" option in uVision4 for the SiLabs parts. Sorry if I didn't make that clear in my original post.

    Mark