【Preliminary Note】The original hardware example in this article was written based on the RP2040. The actual hardware used in this hands-on demonstration features the W55RP20 as the main controller chip. The circuit logic and UF2 flashing operation principles are universally applicable, with only the main controller model differing. The original chip model mentioned in the circuit descriptions below is provided for reference purposes only.
Pin function to reuse
Put simply, pin multiplexing means "one GPIO pin can serve multiple roles" — for example, a single GPIO pin can function as an ordinary switch (to control the on/off state of an LED), or be switched to act as an "SPI interface"(to connect to a sensor) or a "UART interface"(to connect to a serial port). This is just like a phone's Type-C port, which can not only charge the device but also transfer data and connect to other peripherals: one interface delivering multiple functions, and this is exactly what "to reuse" refers to.
Each individual GPIO pin can be connected to an internal peripheral via the GPIO functions defined below:
Figure 2.6 RP2040 GPIO Pin Function Table (Pins 0-21)
Figure 2.7 RP2040 GPIO Pin Function Multiplexing Table (22-29)
This table is the " GPIO Role Selection Table", and its structure and usage are very simple:
The first column (GPIO number): refers to the specific GPIO pins (e. g., GPIO0, GPIO1), with each pin corresponding to one row;
Columns F1 to F9 (function options): represent the "roles" that this GPIO can switch between (for example, F1 corresponds to SPI0 RX, and F2 corresponds to UART0 TX) — each GPIO can select one function from these options for use, and only one function can be selected at a time;
Figure 2.8 RP2040 Pin Function Multiplexing Description Table
The function description table above explains the internal components of the chip corresponding to each "role"(for example, SPIx corresponds to the SPI controller in the chip, and UARTx corresponds to the UART controller), as well as the purpose of each function.
We sent a verification link to your address. Open it to activate your account, then log in.
Accounts from this email provider are reviewed by an administrator after verification. Approval usually takes one business day.
Already have an account?
Reset your password
Enter your email address. If it belongs to an account, we'll send a link to set a new password. Members who joined before the site update use this to set their password.
Check your email
If an account uses that address, we sent a link to set a new password. The link works once and expires in 30 minutes.