cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F7: setting PA15 as GPIO breaks SWD connection

JBerg.2
Associate

I'm using an STM32F750 with the JTAG/SWD pins as follows:

  • PA13 (JTMS/SWDIO) is connected to my debug header
  • PA14 (JTCK/SWCLK) is connected to my debug header
  • PA15 (JTDI) is to be used as a general-purpose output
  • PB3 (JTDO/TRACESWO) is connected to my debug header
  • PB4 (JTRST) is to be used as a general-purpose output

I'm finding that as soon as I change the alternate function mapping for PA15 from alternate-function to general purpose output mode, I lose my SWD connection and cannot connect over SWD anymore - even though PA15 isn't used in SWD anyway and isn't connected to the debug header.

Specifically, writing GPIOA->MODER from its default of 0xA8000000 to 0x68000000 causes SWD connection to be lost. I can set PA15 to input mode (0x28000000) or analog mode (0xE8000000) without breaking SWD, but setting it as a general-purpose *output* causes SWD connection to be lost.

I've found discussion about other STM32 parts where the SWD-only configuration requires setting some bits in AFIO->MAPR, but there is no AFIO block on the STM32F750.

Is there a workaround here?

1 ACCEPTED SOLUTION

Accepted Solutions
JBerg.2
Associate

Well, I feel dumb. The cause was... bad soldering: I had a short between PA14/SWCLK and PA15/JTDI.

Whoops!

View solution in original post

2 REPLIES 2
JBerg.2
Associate

Well, I feel dumb. The cause was... bad soldering: I had a short between PA14/SWCLK and PA15/JTDI.

Whoops!

Thanks for coming back with the solution - and yes, it is a valid solution, useful to others which could just as easily make the same or similar mistake.

Please select your post as Best, so that the thread is marked as solved.

JW