Skip to main content
jamie23
Associate II
January 5, 2016
Question

STM32F205 SWD-only debugging during sleep?

  • January 5, 2016
  • 2 replies
  • 915 views
Posted on January 05, 2016 at 11:53

Hi, I recently tracked down an issue with PA15 staying high during Standby (and therefore holding an external component in reset). It only happened in debug builds where we need the debugger to stay attached during standby using:

DBGMCU_Config(DBGMCU_STANDBY, ENABLE);

We use SWD debugging, so I wanted to know if there was any way of disabling the JTAG interface (specifically JTDI) but keeping SWD debugging alive?

Any tips appreciated.
    This topic has been closed for replies.

    2 replies

    re.wolff9
    Senior
    January 5, 2016
    Posted on January 05, 2016 at 12:51

    The debug features are just ''alternate functions'' for the pins that happen to be activated at reset. So you should just configure the pin to be input or output (whatever suits you) and disable its alternative function.  You can ''lock out the debugger'' that way if you do it on a pin that your debugger needs.... 

    jamie23
    jamie23Author
    Associate II
    January 5, 2016
    Posted on January 05, 2016 at 14:19

    Thanks for the reply. I thought that the alternate mapping would be invalidated once the processor entered standby, but if it preserves state and only gets reset when the processor wakes from standby (I use EXTI and RTC to wake up), than that would be great. Will post results.