🛠 Flasher MicroPython sur une carte RP2350 générique et faire clignoter la première LED

RP2350 (generic / RP2350-based boards) · debutant · Schéma : IMG-rp2350-generic-debutant-1-rp2350-flash-micropython.svg — carte RP2350 générique au format Pico (type Pimoroni Tiny2350 ou XIAO RP2350) maintenue par un doigt sur le bouton BOOT, câble USB branché, fenêtre Thonny avec le REPL MicroPython, LED GP25 illuminée

Objectives

The RP2350 is Raspberry Pi's second microcontroller (announced on August 8, 2024, with the chip costing as little as $0.80 in volume) and it powers a galaxy of "generic" boards: Seeed XIAO RP2350, Pimoroni Tiny2350/PicoPlus2, SparkFun Pro Micro RP2350, Solder Party Stamp, Waveshare Core/Zero… They all share the same programming method: the immutable boot ROM waits for the BOOTSEL button to be held while plugging in to expose a USB drive RPI-RP2 onto which you drop a UF2 file. The official MicroPython rp2 port supports the RP2350 (official docs). By the end of this tutorial, your board will speak Python.

Hardware

Complete Steps

  1. BOOTSEL mode: Unplug the board, hold down the BOOT button (sometimes marked BOOTSEL or SET), plug in the USB, then release. The RPI-RP2 drive appears.
  2. Drag the RP2350 .uf2 onto the drive. The LED blinks, the drive disappears: the board restarts on MicroPython.
  3. In Thonny: bottom-right menu → "Python Interpreter" → MicroPython (RP2350) (or "Generic USB CDC"), automatic serial port. The REPL displays:
MicroPython ...; RP2 port with board generic
>>> import machine, sys
>>> sys.platform
'rp2'
  1. First program — on Pico-format boards, the user LED is on GP25:
# main.py — clignotement GP25 (format Pico 2)
from machine import Pin
import time

led = Pin(25, Pin.OUT)
while True:
    led.toggle
    time.sleep_ms(250)

On XIAO RP2350 or Tiny2350, the LED may be elsewhere (often RGB WS2812): consult the manufacturer's datasheet — that's THE data to check.

Expected Verification

The LED blinks at 2 Hz as soon as the board is powered (the main.py file runs at boot). machine.freq returns 150000000: the RP2350 runs at 150 MHz nominal, compared to 125 MHz by default on the RP2040 — note that this is *lower* than the 200 MHz overclockable limit of the RP2040, so don't assume a higher frequency when migrating code.

Common Errors

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials