STM32F7: setting PA15 as GPIO breaks SWD connection
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?