Using SWD pins as GPIO
Hi,
at the moment on the STM32U5G9 we have the SWD pins (SWDIO and SWCLK) set to DEBUG, but we would like to also use them as GPIO after programming.
How do we switch them to GPIO at runtime?
Thank you
Hi,
at the moment on the STM32U5G9 we have the SWD pins (SWDIO and SWCLK) set to DEBUG, but we would like to also use them as GPIO after programming.
How do we switch them to GPIO at runtime?
Thank you
Dear @Ricko ,
You can by software anytime at your application change the GPIOA_MODER to either Input or Output as below


then also to remove or keep the internal pull-up/down resistors . Routing these signals also is important at PCB as they share with Debug connector or test points .
hope it helps you,
STOne-32
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.