145
/
838
Nations Technologies Inc.
Tel
:
+86-755-86309900
:
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
Bit 15
PD01_RMP: PD0/ PD1 is mapped to OSC_ in/OSC_out (PD0/PD1 mapping on OSC_IN/OSC_OUT)
This bit can be set to '1' or '0' by software. It controls the GPIO function image of PD0 and PD1. PD0 and
PD1 can be mapped to the OSC_IN and OSC_OUT pins when the main oscillator HSE is not used (the
system runs on the internal 8MHz RC oscillator).
0: Do not remap PD0 and PD1;
1:PD0 is mapped to OSC _ in, and pd1 is mapped to OSC_OUT.
This function can only be applied to 48-pin and 64-pin packages (there are PD0 and PD1 on 80-pin, 100-
pin and 128-pin packages, and there is no need to remap them).
Note: The external interrupt/event function has not been remapped. On 48-pin and 64-pin packages, PD0 and PD1
cannot be used to generate external interrupts/events. That is, for LQFP48/64 package, there are only two pins
OSC_IN and OSC_OUT (without PD0 and PD1), which can be mapped to PD0 and PD1 when external crystal
oscillator is not used. For 80-pin and above packages, PD0 and PD1 pins are available, and OSC_IN and OSC_OUT
are available, so there is no need to remap PD0/
PD1 to OSC_IN/OSC_OUT.
JTAG/SWD alternate function remapping
The SWD-JTAG debug interface is enabled by default when the chip is powered on, and the debug interface is
mapped to the GPIO port, as shown in the following Table.
Alternate function
GPIO port
JTMS/SWDIO
PA13
JTCK/SWCLK
PA14
JTDI
PA15
JTDO
PB3
NJTRST
PB4
If you need to use its GPIO function during debugging, you can set the AFIO_RMP_CFG.SW_JTAG_CFG[2:0] bits
can change the above remapping configuration. See the Table below.
Table 7-3 Debug port image
SW_JTAG_
CFG[2:0]
Possible debug ports for
SWJ I/O pin allocation
PA13/
JTMS/
SWDIO
PA14/
JTCK/
SWCLK
PA15/ JTDI
PB3/
JTDO
PB4/
NJTRST
000
Complete SWJ(JTAG-DP+SW-DP)
(reset state)
I/O is not
available
I/O is not
available
I/O is not
available
I/O is not
available
I/O is not
available
001
Complete SWJ(JTAG-DP+SW-DP)
But there is no NJTRST.
I/O is not
available
I/O is not
available
I/O is not
available
I/O is not
available
I/O available
010
Turn off JTAG-DP and enable SW-DP.
I/O is not
available
I/O is not
available
I/O
available
I/O available I/O available
100
Turn off JTAG-DP and SW-DP.
I/O available I/O available
I/O
available
I/O available I/O available
other
Forbidden