Using GPIO through the RP2040

I have my board running Ubuntu 24.04 Desktop, and it looks like in the schematic, the RP2040 is connected directly to the N100’s internal USB 2.0 bus, and via UART.

Scanning with lsusb, though, I don’t see the RP2040 at all:

$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 1997:2466 Shenzhen Riitek Technology Co., Ltd Wireless Receiver
Bus 003 Device 003: ID 13d3:3572 IMC Networks Bluetooth Radio
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

And I can’t find any documentation in the Driver installation pages for setting up GPIO access under Linux. It seems like there’s something called ‘Zadig’ for Windows, but is there any way to access the pins or manage fan control (which seems to go through the RP2040 too?) in Ubuntu or Linux distros?

1 Like

From Les Pounder on Twitter, it sounds like the RP2040 flashing process may be the same as with the X2L: https://docs.radxa.com/en/x/x2l/software-development/flash

I will give this a try and see if it works!

1 Like

He also posted this video on YouTube going through the full process and demonstrating some LEDs driven by the RP2040: https://www.youtube.com/watch?v=rUkpIG_3D9k

It looks like you can press the button on the board, and it resets the RP2040 and holds down BOOTSEL so it becomes a USB mass storage device. Drag a UF2 file to it and it will reboot into that. I’ve tested with MicroPython + Thonny and it seems to work.

Is the pinout the same on the X4 as the X2L? https://docs.radxa.com/en/x/x2l/software-development/gpio

1 Like

Hi,
By looking at the product brief page 7 (Download section of the X4 product page), it seems to be a bit different :


The color of the header of both cards are the same, so it’s only a difference of pin numbering or i’m reading it wrong :confused:

Edit : After looking at it for more than 30s… I’m not confused anymore, the mapping seems to be the same, only the Pi header pin numbering changes.

The row near the edge of the board corresponds to even pins, and the inside row corresponds to the odd pins. The only difference I see is on GP23 which now has UART, I2C and PWM capabilites.

3 Likes

I would like to install StandardFirmata on the Radxa X4 RP2040 board but do not see this board listed yet in the options. Could you provide the Firmata/Boards.h GPIO pin settings?

Could this be it- https://github.com/firmata/ConfigurableFirmata/issues/115 ?

To flash RP2040 on Radxa X4, you can refer to this guide.

The 40-pin header on the Radxa X4 has a different pinout than the Pico, if you want to the lib Firmata, maybe you need to map the Radxa X4 pin to the Pico pin first.