![Maxim Integrated MAX32660 User Manual Download Page 60](http://html1.mh-extra.com/html/maxim-integrated/max32660/max32660_user-manual_1744484060.webp)
MAX32660 User Guide
Maxim Integrated
Page 60 of 195
Following a POR event GPIO[2:13] are configured with the following default settings:
•
GPIO mode enabled
−
[pin]
= 1
−
[pin]
= 0
•
Pull-up/Pull-down disabled, I/O in Hi-Z mode
−
[pin]
= 0
•
Output mode disabled
−
[pin]
= 0
•
Interrupt disabled
−
[pin]
= 0
Note: On parts without a SWD JTAG port, the SWD JTAG port is still available for boundary scan testing, however, the SWD
JTAG port is hardware disabled. To use the SWD JTAG pins in I/O mode, set the desired GPIO pins for SWD alternate function
and set the JTAG SWD disable field to 1 (
.swd_dis = 1).
6.2.1
I/O Mode and Alternate Function Selection
Each I/O pin supports standard GPIO mode or one of up to three Alternate Function modes. The alternate functions
assigned to each I/O pin are shown in the pin description table for the specific package. See
for the 20-TQFN.
6.2.2
Input mode configuration
Perform the following steps to configure a pin or pins for input mode:
1.
Set the pin for I/O mode
a.
[pin]
= 1
b.
[pin]
= 0
2.
Configure the pin for pull-up, pull-down, or high-impedance mode. Refer to
and pull-down selection
3.
GPIO pins with I
2
C as an alternate function (GPIO[9:8] and GPIO[3:2]) only support high-impedance mode or a
weak pull-down resistor.
4.
Set
[pin]
to 1 to enable the pull resistor or clear the bit to set the input to high impedance mode.
5.
Read the input state of the pin using the
[pin]
field.
6.2.3
Output Mode Configuration
Perform the following steps to configure a pin for output mode:
1.
Set the pin for I/O mode.
a.
[pin]
= 1
b.
[pin]
= 0
c.
Enable the output buffer for the pin by setting
[pin]
to 1.
2.
Set the output drive strength using the
[pin]
and
[pin]
bits.
a.
for configuration details and the modes supported.
b.
Reference the MAX32660 datasheet for the electrical characteristics for the drive strength modes.
3.
Set the output high or low using the
[pin]
bit.
6.2.4
GPIO Drive Strength
Each I/O pin supports multiple selections for drive strength. Standard GPIO pins are configured for the supported modes
using the