PINMUX & PAD
Pin Multiplexing
Overview
Due to limited pin resources, the chip provides pin multiplexing (PINMUX) functionality to enhance design flexibility. Each pin can be configured to connect to different internal IP circuits. For the specific mapping between pins and IP circuits, please refer to Function Multiplexing .
The pin multiplexing table provides the following key information:
Pin distribution under different Part numbers
On-chip peripheral signals supported by each pin
Distribution of power-up latch pins (Trap Pin)
Default pin allocation for J-Link Debug Interface (SWD)
Default pin allocation for firmware download, command interaction, and log functions via serial port (LOGUART)
Power supply information for each I/O pin, etc.
Function Multiplexing
Usage Method
Developers can connect pins to specified on-chip peripheral signals by calling the programming interface Pinmux_Config(PinName, PinFuncID)
.
Parameter description:
- PinName:
Pin identifier
- PinFuncID:
Specified signal ID of the on-chip peripheral controller
Based on the configured function-id
, pins can either output
internal chip signals to external devices or receive signals input
from external devices to internal chip modules.
For specific pin to function-id
mappings, refer to
Pinmux Table
.
Function ID
Function ID 0~{{IC_PARAM_FUNCID_DEDICATE_END}}
When Function ID is
0~{{IC_PARAM_FUNCID_DEDICATE_END}}
, each pin can only connect to fixed signals of specific IPs. These pins have limited configurable functions, but dedicated designs can maximize the performance of each IP module.Note
For example, both Function ID {{IC_PARAM_FUNCID_DEDICATE_END}} and Function IDs {{IC_PARAM_FUNCID_FULL_MATRIX_SPI1_CLK}}~{{IC_PARAM_FUNCID_FULL_MATRIX_SPI1_CS}} represent SPI functions.
Function ID {{IC_PARAM_FUNCID_DEDICATE_END}} uses dedicated pins, enabling SPI function to achieve maximum rate of 50MHz (master mode).
Function ID {{IC_PARAM_FUNCID_FULL_MATRIX_SPI1_CLK}}~{{IC_PARAM_FUNCID_FULL_MATRIX_SPI1_CS}} (full-cross pins) can only achieve maximum rate of 12.5MHz (master mode).
Take
PB30
as an example: When configured with Function ID1
, this pin will be directly connected to theUART1_RXD
signal of UART1 through pin multiplexing.Refer to the Pinmux Table for specific function assignments supported by each pin.
PB30 pin multiplexing connection diagram
Function ID {{IC_PARAM_FUNCID_FULL_MATRIX_START}}~{{IC_PARAM_FUNCID_FULL_MATRIX_END}}
When Function ID is
{{IC_PARAM_FUNCID_FULL_MATRIX_START}}~{{IC_PARAM_FUNCID_FULL_MATRIX_END}}
, each pin can connect to different signals of specific IPs. This design provides greater configuration flexibility, but with limitations in application scope and performance (e.g., maximum transmission rate) of some IP modules.Take
PA27
as an example:When configuring Function ID of
PA27
as19
, it connects toUART0_TXD
signal of UART0;When configuring Function ID of
PA27
as20
, it connects toUART0_RXD
signal of UART0.
Refer to the Pinmux Table for specific configurations.
PA27 pin multiplexing connection diagram
Usage Method
Developers can connect pins to specified on-chip peripheral signals by calling the programming interface Pinmux_Config(PinName, PinFuncID)
.
Parameter description:
- PinName:
Pin identifier
- PinFuncID:
Specified signal ID of the on-chip peripheral controller
Based on the configured function-id
, pins can either output
internal chip signals to external devices or receive signals input
from external devices to internal chip modules.
For specific pin to function-id
mappings, please refer to
Pinmux Table
.
Function ID
Function ID 0~{{IC_PARAM_FUNCID_DEDICATE_END}}
When Function ID is
0~{{IC_PARAM_FUNCID_DEDICATE_END}}
, each pin can only connect to fixed signals of specific IPs. These pins have limited configurable functions, but dedicated designs can maximize the performance of each IP module.Note
For example, both Function ID {{IC_PARAM_FUNCID_DEDICATE_SPI0}} and Function IDs {{IC_PARAM_FUNCID_FULL_MATRIX_SPI1_CLK}}~{{IC_PARAM_FUNCID_FULL_MATRIX_SPI1_CS}} represent SPI functions.
Function ID {{IC_PARAM_FUNCID_DEDICATE_SPI0}} uses dedicated pins, enabling SPI function to achieve maximum rate of 50MHz (master mode);
Function IDs {{IC_PARAM_FUNCID_FULL_MATRIX_SPI1_CLK}}~{{IC_PARAM_FUNCID_FULL_MATRIX_SPI1_CS}} (full-cross pins) can only achieve maximum rate of 12.5MHz (master mode).
Take
PB5
as an example: When configured with Function ID6
, this pin will be directly connected to theSPI1_CS
signal of SPI through pin multiplexing.Refer to the Pinmux Table for specific function assignments supported by each pin.
PB5 pin multiplexing connection diagram
Function ID {{IC_PARAM_FUNCID_FULL_MATRIX_START}}~{{IC_PARAM_FUNCID_FULL_MATRIX_END}}
When Function ID is
{{IC_PARAM_FUNCID_FULL_MATRIX_START}}~{{IC_PARAM_FUNCID_FULL_MATRIX_END}}
, each pin can connect to different signals of specific IPs. This design provides greater configuration flexibility, but with limitations in application scope and performance (e.g., maximum transmission rate) of some IP modules.Take
PA11
as an example:When configuring Function ID of
PA11
as20
, it connects toUART0_TXD
signal of UART0;When configuring Function ID of
PA11
as21
, it connects toUART0_RXD
signal of UART0.
Refer to the Pinmux Table for specific configurations.
PA11 pin multiplexing connection diagram
Note
When using
PA23~PA31
andPB0~PB10
pins, I/O voltage can be set to 1.8V or 3.3V. By default,PB11~PB19
are dedicated to Audio functions.If
PB11~PB19
pins are used for other functions, note that their I/O voltage can only be set to 1.8V. For more information about I/O voltage, refer to Pinmux Table .
Audio Function
PB11~PB19
are Audio function pins. If spare pins are available, it is not recommended to usePB11~PB19
for general digital functions to avoid interference with Audio functionality.If multiplexing
PB11~PB19
for both Audio and digital functions, ensure proper layout design to keep digital signal traces away from Audio signal traces, thereby reducing interference risks.
ADC/Cap-Touch Function
When using
PA28~PA31
andPB1~PB5
pins for ADC or Cap-Touch functions, call the programming interfacePAD_InputCtrl(PinName, DISABLE)
to disable the digital input path.Cap-Touch performance is closely related to parasitic capacitance. Pay special attention to layout design. For details, refer to the ADC/CTC Layout Guide.
Usage Method
Developers can connect pins to specified on-chip peripheral signals by calling the programming interface Pinmux_Config(PinName, PinFuncID)
.
Parameter description:
- PinName:
Pin identifier
- PinFuncID:
Specified signal ID of the on-chip peripheral controller
Based on the configured function-id
, pins can either output
internal chip signals to external devices or receive signals input
from external devices to internal chip modules.
For specific pin to function-id
mappings, please refer to
Pinmux Table
.
Function ID
Function ID 0~{{IC_PARAM_FUNCID_DEDICATE_END}}
When Function ID is
0~{{IC_PARAM_FUNCID_DEDICATE_END}}
, each pin can only connect to fixed signals of specific IPs. These pins have limited configurable functions, but dedicated designs can maximize the performance of each IP module.Note
For example, both Function ID {{IC_PARAM_FUNCID_DEDICATE_SPI0}} and Function IDs {{IC_PARAM_FUNCID_FULL_MATRIX_SPI1_CLK}}~{{IC_PARAM_FUNCID_FULL_MATRIX_SPI1_CS}} represent SPI functions.
Function ID {{IC_PARAM_FUNCID_DEDICATE_SPI0}} uses dedicated pins, enabling SPI function to achieve maximum rate of 50MHz (master mode);
Function IDs {{IC_PARAM_FUNCID_FULL_MATRIX_SPI1_CLK}}~{{IC_PARAM_FUNCID_FULL_MATRIX_SPI1_CS}} (full-cross pins) can only achieve maximum rate of 12.5MHz (master mode).
Take
PB5
as an example: When configured with Function ID6
, this pin will be directly connected to theSPI1_CS
signal of SPI through pin multiplexing.Refer to the Pinmux Table for specific function assignments supported by each pin.
PB5 pin multiplexing connection diagram
Function ID {{IC_PARAM_FUNCID_FULL_MATRIX_START}}~{{IC_PARAM_FUNCID_FULL_MATRIX_END}}
When Function ID is
{{IC_PARAM_FUNCID_FULL_MATRIX_START}}~{{IC_PARAM_FUNCID_FULL_MATRIX_END}}
, each pin can connect to different signals of specific IPs. This design provides greater configuration flexibility, but with limitations in application scope and performance (e.g., maximum transmission rate) of some IP modules.Take
PA11
as an example:When configuring Function ID of
PA11
as20
, it connects toUART0_TXD
signal of UART0;When configuring Function ID of
PA11
as21
, it connects toUART0_RXD
signal of UART0.
Refer to the Pinmux Table for specific configurations.
PA11 pin multiplexing connection diagram
Note
When using
PA23~PA31
andPB0~PB10
pins, I/O voltage can be set to 1.8V or 3.3V. By default,PB11~PB19
are dedicated to Audio functions.If
PB11~PB19
pins are used for other functions, note that their I/O voltage can only be set to 1.8V. For more information about I/O voltage, refer to Pinmux Table .
Audio Function
PB11~PB19
are Audio function pins. If spare pins are available, it is not recommended to usePB11~PB19
for general digital functions to avoid interference with Audio functionality.If multiplexing
PB11~PB19
for both Audio and digital functions, ensure proper layout design to keep digital signal traces away from Audio signal traces, thereby reducing interference risks.
ADC/Cap-Touch Function
When using
PA28~PA31
andPB1~PB5
pins for ADC or Cap-Touch functions, call the programming interfacePAD_InputCtrl(PinName, DISABLE)
to disable the digital input path.Cap-Touch performance is closely related to parasitic capacitance. Pay special attention to layout design. For details, refer to the ADC/CTC Layout Guide.
Usage Method
Developers can connect pins to specified on-chip peripheral signals by calling the programming interface Pinmux_Config(PinName, PinFuncID)
.
Parameter description:
- PinName:
Pin identifier
- PinFuncID:
Specified signal ID of the on-chip peripheral controller
Based on the configured function-id
, pins can either output
internal chip signals to external devices or receive signals input
from external devices to internal chip modules.
For specific pin to function-id
mappings, please refer to
Pinmux Table
.
Function ID
Function ID 0~{{IC_PARAM_FUNCID_DEDICATE_END}}
When Function ID is
0~{{IC_PARAM_FUNCID_DEDICATE_END}}
, each pin can only connect to fixed signals of specific IPs. These pins have limited configurable functions, but dedicated designs can maximize the performance of each IP module.Note
For example, both Function ID {{IC_PARAM_FUNCID_DEDICATE_SPI0}} and Function IDs {{IC_PARAM_FUNCID_FULL_MATRIX_SPI1_CLK}}~{{IC_PARAM_FUNCID_FULL_MATRIX_SPI1_CS}} represent SPI functions.
Function ID {{IC_PARAM_FUNCID_DEDICATE_SPI0}} uses dedicated pins, enabling SPI function to achieve maximum rate of 50MHz (master mode);
Function IDs {{IC_PARAM_FUNCID_FULL_MATRIX_SPI1_CLK}}~{{IC_PARAM_FUNCID_FULL_MATRIX_SPI1_CS}} (full-cross pins) can only achieve maximum rate of 12.5MHz (master mode).
Take
PB5
as an example: When configured with Function ID6
, this pin will be directly connected to theSPI1_CS
signal of SPI through pin multiplexing.Refer to the Pinmux Table for specific function assignments supported by each pin.
PB5 pin multiplexing connection diagram
Function ID {{IC_PARAM_FUNCID_FULL_MATRIX_START}}~{{IC_PARAM_FUNCID_FULL_MATRIX_END}}
When Function ID is
{{IC_PARAM_FUNCID_FULL_MATRIX_START}}~{{IC_PARAM_FUNCID_FULL_MATRIX_END}}
, each pin can connect to different signals of specific IPs. This design provides greater configuration flexibility, but with limitations in application scope and performance (e.g., maximum transmission rate) of some IP modules.Take
PA11
as an example:When configuring Function ID of
PA11
as20
, it connects toUART0_TXD
signal of UART0;When configuring Function ID of
PA11
as21
, it connects toUART0_RXD
signal of UART0.
Refer to the Pinmux Table for specific configurations.
PA11 pin multiplexing connection diagram
Note
When using
PA23~PA31
andPB0~PB10
pins, I/O voltage can be set to 1.8V or 3.3V. By default,PB11~PB19
are dedicated to Audio functions.If
PB11~PB19
pins are used for other functions, note that their I/O voltage can only be set to 1.8V. For more information about I/O voltage, refer to Pinmux Table .
Audio Function
PB11~PB19
are Audio function pins. If spare pins are available, it is not recommended to usePB11~PB19
for general digital functions to avoid interference with Audio functionality.If multiplexing
PB11~PB19
for both Audio and digital functions, ensure proper layout design to keep digital signal traces away from Audio signal traces, thereby reducing interference risks.
ADC/Cap-Touch Function
When using
PA28~PA31
andPB1~PB5
pins for ADC or Cap-Touch functions, call the programming interfacePAD_InputCtrl(PinName, DISABLE)
to disable the digital input path.Cap-Touch performance is closely related to parasitic capacitance. Pay special attention to layout design. For details, refer to the ADC/CTC Layout Guide.
Usage Method
Developers can connect pins to specified on-chip peripheral signals by calling the programming interface Pinmux_Config(PinName, PinFuncID)
.
Parameter description:
- PinName:
Pin identifier
- PinFuncID:
Specified signal ID of the on-chip peripheral controller
Based on the configured function-id
, pins can either output
internal chip signals to external devices or receive signals input
from external devices to internal chip modules.
For specific pin to function-id
mappings, please refer to
Pinmux Table
.
Function ID
Function ID 0~{{IC_PARAM_FUNCID_DEDICATE_END}}
Each pin can only connect to fixed signals of specific IPs.
Take
PA0
as an example: When configured with Function ID1
, this pin will be directly connected to theUART2_RXD
signal of UART2 through pin multiplexing.Refer to the Pinmux Table for specific function assignments supported by each pin.
PA0 pin multiplexing connection diagram
Note
When using
PA9~PA16
andPB25~PB31
pins, I/O voltage can be set to 1.8V or 3.3V. By default,PA18~PB6
are dedicated to Audio functions.If
PA18~PB6
pins are used for other functions, note that their I/O voltage can only be set to 1.8V. For more information about I/O voltage, refer to Pinmux Table .
Audio Function
PA18~PB6
are Audio function pins. If spare pins are available, it is not recommended to usePA18~PB6
for general digital functions to avoid interference with Audio functionality.If multiplexing
PA18~PB6
for both Audio and digital functions, ensure proper layout design to keep digital signal traces away from Audio signal traces, thereby reducing interference risks.
ADC/Cap-Touch Function
When using
PA0~PA8
pins for ADC or Cap-Touch functions, call the programming interfacePAD_InputCtrl(PinName, DISABLE)
to disable the digital input path.Cap-Touch performance is closely related to parasitic capacitance. Pay special attention to layout design. For details, refer to the ADC/CTC Layout Guide.
Usage Method
Developers can connect pins to specified on-chip peripheral signals by calling the programming interface Pinmux_Config(PinName, PinFuncID)
.
Parameter description:
- PinName:
Pin identifier
- PinFuncID:
Specified signal ID of the on-chip peripheral controller
Based on the configured function-id
, pins can either output
internal chip signals to external devices or receive signals input
from external devices to internal chip modules.
For specific pin to function-id
mappings, refer to
Pinmux Table
.
Function ID
Function ID 0~{{IC_PARAM_FUNCID_DEDICATE_END}}
When Function ID is
0~{{IC_PARAM_FUNCID_DEDICATE_END}}
, each pin can only connect to fixed signals of specific IPs. These pins have limited configurable functions, but dedicated designs can maximize the performance of each IP module.Note
For example, both Function ID {{IC_PARAM_FUNCID_DEDICATE_END}} and Function IDs {{IC_PARAM_FUNCID_FULL_MATRIX_SPI1_CLK}}~{{IC_PARAM_FUNCID_FULL_MATRIX_SPI1_CS}} represent SPI functions.
Function ID {{IC_PARAM_FUNCID_DEDICATE_END}} uses dedicated pins, enabling SPI function to achieve maximum rate of 50MHz (master mode);
Function IDs {{IC_PARAM_FUNCID_FULL_MATRIX_SPI1_CLK}}~{{IC_PARAM_FUNCID_FULL_MATRIX_SPI1_CS}} (full-cross pins) can only achieve maximum rate of 12.5MHz (master mode).
Take
PB16
as an example: When configured with Function ID10
, this pin will be directly connected to theSPI1_CS
signal of UART1 through pin multiplexing.Refer to the Pinmux Table for specific function assignments supported by each pin.
PB16 pin multiplexing connection diagram
Function ID {{IC_PARAM_FUNCID_FULL_MATRIX_START}}~{{IC_PARAM_FUNCID_FULL_MATRIX_END}}
When Function ID is
{{IC_PARAM_FUNCID_FULL_MATRIX_START}}~{{IC_PARAM_FUNCID_FULL_MATRIX_END}}
, each pin can connect to different signals of specific IPs. This design provides greater configuration flexibility, but with limitations in application scope and performance (e.g., maximum transmission rate) of some IP modules.Take
PB19
as an example:When configuring Function ID of
PB19
as95
, it connects toUART0_TXD
signal of UART0;When configuring Function ID of
PB19
as96
, it connects toUART0_RXD
signal of UART0.
Refer to the Pinmux Table for specific configurations.
PB19 pin multiplexing connection diagram
Trap Pins
Caution
Before development, please pay attention to the following pin multiplexing related matters to avoid usage issues due to accidental behavior.
During chip power-up, certain pins are latched by internal circuits to determine whether to enter different modes.
The table below lists all Trap pins and their descriptions.
Pin name |
Symbol |
Active level |
Description |
---|---|---|---|
PB31 |
TM_DIS |
Low |
|
PB5 |
UD_DIS |
Low |
|
Pin name |
Symbol |
Active level |
Description |
---|---|---|---|
PB31 |
TM_DIS |
Low |
|
PB5 |
UD_DIS |
Low |
|
PA22 |
PSO_SEL |
- |
Refer to Datasheet for details. |
Pin name |
Symbol |
Active level |
Description |
---|---|---|---|
PB31 |
TM_DIS |
Low |
|
PB5 |
UD_DIS |
Low |
|
PA22 |
PSO_SEL |
- |
Refer to Datasheet for details. |
Pin name |
Symbol |
Active level |
Description |
---|---|---|---|
PB31 |
TM_DIS |
Low |
|
PB5 |
UD_DIS |
Low |
|
PA22 |
PSO_SEL |
- |
Refer to Datasheet for details. |
Pin name |
Symbol |
Active level |
Description |
---|---|---|---|
PB22 |
TM_DIS |
Low |
|
PB24 |
UD_DIS |
Low |
|
PB21 |
BOOT_SEL |
- |
|
Note
When OTP fields are programmed, priority is given to the programmed OTP status.
Pin name |
Symbol |
Active level |
Description |
---|---|---|---|
PA3 |
TM_DIS |
Low |
|
PB20 |
UD_DIS |
Low |
|
PB18 |
BOOT_SEL |
- |
|
Note
When OTP fields are programmed, priority is given to the programmed OTP status.
Note
Trap pins require external pull-up or pull-down voltage according to the I/O power supply selection.
Wake Pins
General GPIO pins support waking the system from
CG
andPG
sleep modes.Wake-up pins (
PB30
andPB31
) are directly connected to wake-up circuits, and can wake the system fromDSLP
mode in addition toCG
andPG
modes.
Warning
Disable wake-up functionality before multiplexing these two pins.
Wake-up pins may be multiplexed with Trap pins.
When multiplexing, ensure the Trap pin’s signal level after wake-up does not cause the system to enter unexpected modes.
General GPIO pins support waking the system from
CG
andPG
sleep modes.Wake-up pins (
PA0
andPA1
) are directly connected to wake-up circuits, and can wake the system fromDSLP
mode in addition toCG
andPG
modes.
Warning
Disable wake-up functionality before multiplexing these two pins.
Wake-up pins may be multiplexed with Trap pins.
When multiplexing, ensure the Trap pin’s signal level after wake-up does not cause the system to enter unexpected modes.
General GPIO pins support waking the system from
CG
andPG
sleep modes.Wake-up pins (
PA0
andPA1
) are directly connected to wake-up circuits, and can wake the system fromDSLP
mode in addition toCG
andPG
modes.
Warning
Disable wake-up functionality before multiplexing these two pins.
Wake-up pins may be multiplexed with Trap pins.
When multiplexing, ensure the Trap pin’s signal level after wake-up does not cause the system to enter unexpected modes.
General GPIO pins support waking the system from
CG
andPG
sleep modes.Wake-up pins (
PA0
andPA1
) are directly connected to wake-up circuits, and can wake the system fromDSLP
mode in addition toCG
andPG
modes.
Warning
Disable wake-up functionality before multiplexing these two pins.
Wake-up pins may be multiplexed with Trap pins.
When multiplexing, ensure the Trap pin’s signal level after wake-up does not cause the system to enter unexpected modes.
General GPIO pins support waking the system from
CG
andPG
sleep modes.Wake-up pins (
PB21
~PB24
) are directly connected to wake-up circuits, and can wake the system fromDSLP
mode in addition toCG
andPG
modes.
Warning
Disable wake-up functionality before multiplexing these two pins.
Wake-up pins may be multiplexed with Trap pins.
When multiplexing, ensure the Trap pin’s signal level after wake-up does not cause the system to enter unexpected modes.
General GPIO pins support waking the system from
CG
andPG
sleep modes.Wake-up pins (
PA0
~PA3
) are directly connected to wake-up circuits, and can wake the system fromDSLP
mode in addition toCG
andPG
modes.
Warning
Disable wake-up functionality before multiplexing these two pins.
Wake-up pins may be multiplexed with Trap pins.
When multiplexing, ensure the Trap pin’s signal level after wake-up does not cause the system to enter unexpected modes.
SWD Pins
Pins {{IC_PARAM_SWD_CLK_PIN}}
and {{IC_PARAM_SWD_DATA_PIN}}
are forcibly locked to the SWD function by default.
If you want to multiplex these two pins, you must first disable the SWD function, which is already handled by the programming interface Pinmux_Config()
.
Note
When the following log message appears, it indicates that {{IC_PARAM_SWD_CLK_PIN}}
or {{IC_PARAM_SWD_DATA_PIN}}
has been connected to another module, and you can no longer connect the debugger via that pin.
If you still need to connect the debugger, please refer to Function Multiplexing to reconfigure the pins for the SWD signals.
SWD PAD PortX_PinYY is configured to funcIDZZ
Pins {{IC_PARAM_SWD_CLK_PIN}}
and {{IC_PARAM_SWD_DATA_PIN}}
are forcibly locked to the SWD function by default.
If you want to multiplex these two pins, you must first disable the SWD function, which is already handled by the programming interface Pinmux_Config()
.
Note
When the following log message appears, it indicates that {{IC_PARAM_SWD_CLK_PIN}}
or {{IC_PARAM_SWD_DATA_PIN}}
has been connected to another module, and you can no longer connect the debugger via that pin.
If you still need to connect the debugger, please refer to Function Multiplexing to reconfigure the pins for the SWD signals.
SWD PAD PortX_PinYY is configured to funcIDZZ
Pins {{IC_PARAM_SWD_CLK_PIN}}
and {{IC_PARAM_SWD_DATA_PIN}}
are forcibly locked to the SWD function by default.
If you want to multiplex these two pins, you must first disable the SWD function, which is already handled by the programming interface Pinmux_Config()
.
Note
When the following log message appears, it indicates that {{IC_PARAM_SWD_CLK_PIN}}
or {{IC_PARAM_SWD_DATA_PIN}}
has been connected to another module, and you can no longer connect the debugger via that pin.
If you still need to connect the debugger, please refer to Function Multiplexing to reconfigure the pins for the SWD signals.
SWD PAD PortX_PinYY is configured to funcIDZZ
Pins {{IC_PARAM_SWD_CLK_PIN}}
and {{IC_PARAM_SWD_DATA_PIN}}
are forcibly locked to the SWD function by default.
If you want to multiplex these two pins, you must first disable the SWD function, which is already handled by the programming interface Pinmux_Config()
.
Note
When the following log message appears, it indicates that {{IC_PARAM_SWD_CLK_PIN}}
or {{IC_PARAM_SWD_DATA_PIN}}
has been connected to another module, and you can no longer connect the debugger via that pin.
If you still need to connect the debugger, please refer to Function Multiplexing to reconfigure the pins for the SWD signals.
SWD PAD PortX_PinYY is configured to funcIDZZ
Pins {{IC_PARAM_SWD_CLK_PIN}}
and {{IC_PARAM_SWD_DATA_PIN}}
are forcibly locked to the SWD function by default.
If you want to multiplex these two pins, you must first disable the SWD function, which is already handled by the programming interface Pinmux_Config()
.
Note
When the following log message appears, it indicates that {{IC_PARAM_SWD_CLK_PIN}}
or {{IC_PARAM_SWD_DATA_PIN}}
has been connected to another module, and you can no longer connect the debugger via that pin.
If you still need to connect the debugger, please refer to Function Multiplexing to reconfigure the pins for the SWD signals.
SWD PAD PortX_PinYY is configured to funcIDZZ
Pins {{IC_PARAM_SWD_CLK_PIN}}
and {{IC_PARAM_SWD_DATA_PIN}}
are forcibly locked to the SWD function by default.
If you want to multiplex these two pins, you must first disable the SWD function, which is already handled by the programming interface Pinmux_Config()
.
Note
When the following log message appears, it indicates that {{IC_PARAM_SWD_CLK_PIN}}
or {{IC_PARAM_SWD_DATA_PIN}}
has been connected to another module, and you can no longer connect the debugger via that pin.
If you still need to connect the debugger, please refer to Function Multiplexing to reconfigure the pins for the SWD signals.
SWD PAD PortX_PinYY is configured to funcIDZZ
Pin Control
Overview
Ameba series I/Os provide flexible connectivity options, supporting interfaces with on-chip analog and digital circuits. For details, see I/O Block Diagram. Methods for configuring PAD connections to on-chip signals can be found in the Pin Multiplexing section. This section mainly introduces the functions and programming methods supported by PAD.
I/O Block Diagram
Features
The pin control module supports flexible I/O electrical characteristics control:
Internal Pull-up/Pull-down Resistors
Configurable on-chip resistor network supporting pull-up/pull-down/high-impedance control
Adjustable resistor values for pull-up/pull-down on certain pins
Programmable Driving Strength Levels
Programmable drive capability with multiple selectable levels
Programmable Slew Rate Control
Adjustable signal edge rate, supporting fast/slow mode switching
PAD Control APIs
PAD API Reference
The chip provides a complete PAD control APIs through the {SDK}/component/soc/amebaxxx/fwlib/include/ameba_pinmux.h
header file.
API |
Description |
---|---|
PAD_PullCtrl |
Configure PAD Pull type in Active mpde |
PAD_SleepPullCtrl |
Configure PAD Pull type in Sleep mode |
PAD_ResistorCtrl |
Configure PAD pull-up/pull-down resistor type |
PAD_DrvStrength |
Configure PAD drive strength level |
PAD_InputCtrl |
Enable/disable PAD digital path control |
PAD_SlewRateCtrl |
Configure PAD rise/fall edge rate |
Note
For PAD feature parameters, such as pull-up/down resistor information, drive strength, voltage characteristics, and signal edge rate performance indicators, please refer to the chip datasheet.
LP Mode Pin State Management
In Active and Low power modes, the PAD’s PU/PD functions are controlled by different registers. This design allows for independent configuration of internal pull-up or pull-down resistors for each pin in low power mode.
PAD Input States
Normal Sleep Mode (PG or CG)
The PU/PD functions of all PADs are effective.
Deep Sleep Mode
The PU/PD functions of most PADs remain effective;
The power supply to certain PADs will be turned off, causing the PU/PD on these pins to fail, thus they may float.
If circuits connected to these PADs need to be pulled high or low, external resistors must be used on the PCB.
Note
For PADs where the PU/PD function is ineffective in deep sleep mode, please refer to the chip datasheet.
PAD Output States
Normal Sleep Mode (PG or CG)
The PAD output states will remain the same as before sleep.
For example, if an I/O is set to output 1 before sleep, when the system enters PG or CG, this I/O will still maintain output 1.
Deep Sleep Mode
The 1/0 output states set in Active will be invalid.
For example, if an I/O is set to output 1 before sleep, once the system enters deep sleep, this I/O will not maintain the output 1 state.