If I connect to my MCU with its SWD emulator/debugger, is there ANY difference in performance/behavior as compared to when I run the MCU without the emulator?
EDIT: I am using a freescale KL25z Cortex M0+ with Arm GCC compiler on Eclipse. I am running at full speed.
-
1\$\begingroup\$ That's very vague, you did not tell us which MCU, which debugger you were using, what IDE you were using, what settings you have (maybe there is full speed, or slow-mode for debugging in real time easier). I would say yes, there is a difference both in behaviour and performance - slower speed because of clock cycles used to communicate and share the core/register data contents, and different behaviour as interrupts may not work as intended and there are more pins in use than normally withour the SWD connected. \$\endgroup\$KyranF– KyranF2014年10月17日 05:42:58 +00:00Commented Oct 17, 2014 at 5:42
-
\$\begingroup\$ I see...also, I have added the information you requested \$\endgroup\$hassan789– hassan7892014年10月17日 06:14:01 +00:00Commented Oct 17, 2014 at 6:14
-
\$\begingroup\$ cool! Well I have not used SWD before, only JTAG for the processor used on the Beaglebone (the huge-ass AM3358) so I will not provide a full answer. wait until somebody with more direct experience on this matter answers :) \$\endgroup\$KyranF– KyranF2014年10月17日 07:36:31 +00:00Commented Oct 17, 2014 at 7:36
1 Answer 1
In a word, yes.
As a rule of thumb, a debugger will slow down the target chip. The more expensive real time debugger/ICE tools reduce this but you will still get a measurable slow down.
The slow down is typically because the debugger sticks extra code into your program for breakpoints, RAM monitoring etc.
How much slow down is rather a "how long is a piece of string" question. Your best bet is to measure it.
.
Word to the wise
Always test your code comprehensively without a debugger. It is entirely possible to write embedded code that only works when the debugger is plugged in (the debugger slow down fixes timing issues inadvertently).
Explore related questions
See similar questions with these tags.