How to configure SWIO pin as GPIO pin?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to configure SWIO pin as GPIO pin?

175 Views
Fedora001
Contributor I

Is it possible to use the SWDIO pin on the MKM33Z128 microcontroller as a GPIO pin after programming?  What are the steps required to configure SWDIO as a GPIO pin after programming the controller and how do I set it up for use as a GPIO?

0 Kudos
Reply
1 Reply

138 Views
XuZhang
NXP Employee
NXP Employee

hi,Fedora001

Thank you for your interest in NXP Semiconductor products and the opportunity to serve you, I will gladly help you with this.

I used the FRDM-K32L2B3 development board and the "frdmk32l2b_gpio_led_output" program in the SDK to do some tests. The following is the process of configuring SWDIO pin as GPIO pin.

1. Check the manual to find the pin corresponding to SWDIO, and you can see the SWDIO pin corresponding to PTA3.

XuZhang_1-1721035779602.png

2. Modify the Demo program, set the pin corresponding to SWDIO as GPIO pin in the program, and set the pin to low level.

XuZhang_7-1721036039804.png
XuZhang_4-1721035833793.png

 

3. Download the program to the development board through MCUXpresso.

XuZhang_5-1721035857716.png

 

4. Measure the voltage of pin 2 of J11, and the voltage becomes 0. Then the SWDIO pin is set to GPIO successfully.

XuZhang_6-1721035878786.png

Note that after the above steps are successfully set, the next time you use SWDIO to download the program to the chip, it will fail.

I have attached the code. Let me know if this is helpful, if you have more questions do not hesitate to ask me.

BR

Xu Zhang

0 Kudos
Reply