0
\$\begingroup\$

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.

asked Oct 17, 2014 at 4:44
\$\endgroup\$
3
  • 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\$ Commented Oct 17, 2014 at 5:42
  • \$\begingroup\$ I see...also, I have added the information you requested \$\endgroup\$ Commented 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\$ Commented Oct 17, 2014 at 7:36

1 Answer 1

2
\$\begingroup\$

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).

answered Oct 17, 2014 at 8:14
\$\endgroup\$

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.