When debugging on an embedded board using a debugger, what happens to the timer/ticker when a breakpoint is hit? Is it still working in the background or stops?
Asked
Active
Viewed 410 times
1 Answers
4
Depends on the microcontroller and how it's configured. Generally, though, either:
- Timers are stopped while the microcontroller is halted for debug.
OR
- Timers continue running while the microcontroller is halted for debug, and any interrupts associated with those timers will fire when execution resumes.
The behavior may even differ between different timers. For instance, RTC timers will almost always use behavior #2, even on microcontrollers where other timers are halted under debug.
-
You mean it depends on hardware as well as software but is there any option in debuggers through which we can know what is actually happening? – Bilal Qamar Feb 09 '18 at 20:52
-
3Read the documentation for your microcontroller. – Feb 09 '18 at 22:31
-
@BilalQamar For the specific settings you might need, you may want ask another question specific to your particular embedded system. – jskroch Feb 12 '18 at 21:57