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?
\$\begingroup\$
\$\endgroup\$
3
-
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 StrattonCommented Feb 20, 2019 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\$– scico111Commented Feb 20, 2019 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 StrattonCommented Feb 20, 2019 at 3:46
Add a comment
|
1 Answer
\$\begingroup\$
\$\endgroup\$
2
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.
-
1\$\begingroup\$ They can be (read: always are) SWD during reset and then GPIO after boot. \$\endgroup\$ Commented Feb 20, 2019 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\$– user39382Commented Feb 20, 2019 at 2:11