cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L reuse of JTAG pins (specifically PA15) crashes SWD interface

ahuska
Associate
Posted on December 30, 2011 at 22:34

I am programming and debugging an STM32L (STM32L151C6U6) via SWD.  I can successfully reuse pins PB3 and PB44, and I can successfully set PA15 (JTAG TMI) to be GPIO input, but when I set it to be an output the SWD interface fails (or the core crashes, not sure).  I can't find any errata or information on this topic, but it is a major roadblock because I'm out of GPIO and this is my USB pullup!  Any advice appreciated.

#stm32l-jtag-swd-gpio-reuse
4 REPLIES 4
donald2
Associate II
Posted on December 31, 2011 at 09:00

I had a very similar problem recently.  One of our boards had a solder bridge.  As soon as the start-up code set PA15 as an output, we lost SWD capability.

It was quite a puzzler. PA15 was unused on this board, so I didn't even consider a solder bridge.  It turned out my start-up code, borrowed from another board, was setting effectively setting PA15 as an output.  My co-developer didn't ''know'' the board details, and pointed me in the right direction.

ahuska
Associate
Posted on January 03, 2012 at 19:39

And that is exactly the same problem I found on my board over the weekend, too!

sheldon
Associate II
Posted on October 16, 2012 at 01:57

I had a similar problem with PB2 (BOOT1). If I tried to use it as a GPIO, then it crashed the JTAG debugger. I had spare I/O so I just moved it. The errata mentions a similar problem with PB4 (JTNRST), so I figured this was just another pin exhibiting the same behavior.

mateusz
Associate
Posted on January 22, 2015 at 09:57

Hello,

did You find solution to this issue?

I face the problem:

when I remap PA15 and use it as GPIO Output Push-Pull I loose my SWD interface.