0
\$\begingroup\$

If I use PA13,14 pins for flashing my MCU via ST-LINK programmer then can I also use these pins as GPIO in the same circuit? Will that not disturb the ST-Link if some analog or digital circuit is connected with these pins? Also if I use these pins as GPIO inputs then how will the MCU know if the input signal is for GPIO or for flashing the MCU from ST-Link?

\$\endgroup\$
  • 2
    \$\begingroup\$ 5 questions about the STM32 in as many hours, it would probably be worth while to spend a little more time reading the documentation compared to posting. \$\endgroup\$ – Chris Stratton Feb 20 at 3:16
  • \$\begingroup\$ @ChrisStratton yes I am doing it side by side.. and its highly helpful to get input from experienced people here in parallel to my own reading. I hope I am not violating any rules of the forum here. \$\endgroup\$ – scico111 Feb 20 at 3:24
  • 1
    \$\begingroup\$ Actually, you are. Questions should be researched yourself before posting, and show evidence of that research in the question. What have you already tried? How thoroughly have you read the existing questions here related to this? (The essence of your current question has in fact come up many times here before, usually in the course of people having locked themselves out) \$\endgroup\$ – Chris Stratton Feb 20 at 3:46
1
\$\begingroup\$

If I use PA13,14 pins for flashing my MCU via ST-LINK programmer then can I also use these pins as GPIO in the same circuit?

No. Configuring these pins for SWD (alternate function AF0) will make them unavailable as GPIOs.

\$\endgroup\$
  • 1
    \$\begingroup\$ They can be (read: always are) SWD during reset and then GPIO after boot. \$\endgroup\$ – Ben Voigt Feb 20 at 1:51
  • 1
    \$\begingroup\$ @BenVoigt True. That'd require NRST to be connected to the debugger, though -- and, obviously, it'd make debugging impossible. \$\endgroup\$ – duskwuff Feb 20 at 2:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.