Nations Technologies Inc.
Tel
:
+86-755-86309900
:
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
107
/
631
SPI-I2S pin
configuration
GPIO configuration
Slave mode
Push-pull alternate output
SPIx_I2Sx_NSS_WS
Master mode
Push-pull alternate output
Slave mode
Push-pull alternate output
SPIx_I2Sx_SCK_CK
Master mode
Push-pull alternate output
Slave mode
Push-pull alternate output
Table 5-39 USB
USB pin
GPIO configuration
USB_DM
USB_DP
Once the USB module is enabled, these pins are automatically
connected to the internal USB transceiver
Table 5-40 JTAG/SWD
JTAG/SWD pin
configuration
GPIO configuration
JTMS/SWDIO
Input pull-up
Push-pull alternate pull-up
JTCK/SWCLK
Pull-down output
Push-pull alternate pull-up
JTDI
Input pull-up
Push-pull alternate pull-up
JTDO
Output
Push-pull alternate output
NJTRST
Input pull-up
Push-pull alternate pull-up
Table 5-41 Other
pin
Alternate function
GPIO configuration
EVENT_OUT
EVENT OUT
Push-pull alternate output
COMPx_OUT
COMP
Push-pull alternate output
MCO
clock output
Push-pull alternate output
EXTI Input Line
External interrupt input
Input floating or input pull-up or input pull-
down
GPIO locking mechanism
The locking mechanism is used to freeze the IO configuration to prevent accidental changes. When a lock (LOCK)
procedure is performed on a port bit, the configuration of the port cannot be changed until the next reset, refer to the
port configuration lock register GPIOx_PLOCK.
PLOCKK, that is, GPIOx_PLOCK [16], becomes 1 only after the correct sequence w1-> w0-> w1-> r0 (r0 here
is also a must). After that, it becomes 0 only if the system reset is performed. GPIOx_PLOCK.PLOCK[15:0]
can only be modified at GPIOx_PLOCK.PLOCKK=0.
The lock sequence to set GPIOx_PLOCK.PLOCKK bit, w1-> w0-> w1-> r0 will be valid only if the value (1
or 0) in GPIOx_PLOCK.PLOCK [15:0] does not change during this sequence.The GPIOx_PLOCK.PLOCKK
bit will not be set if the value in GPIOx_PLOCK.PLOCK [15:0] changes during this sequence.
As long as GPIOx_PLOCK.PLOCKK=0 and GPIOx_PLOCK.PLOCKx=0 or 1, all configuration and alternate
function bits can be modified. When GPIOx_PLOCK.PLOCKK=1 but GPIOx_PLOCK.PLOCK[x]=0, the
corresponding configuration and alternate function bits corresponding to GPIOx_PLOCK.PLOCK[x]=0 can be