Skip to content

Update the Pico SDK to 2.3.1 - #11426

Merged
dhalbert merged 2 commits into
adafruit:mainfrom
mikeysklar:pico-sdk-2.3.1
Sep 20, 2026
Merged

dhalbert merged 2 commits into
adafruit:mainfrom
mikeysklar:pico-sdk-2.3.1

Conversation

@mikeysklar

Copy link
Copy Markdown
Collaborator

What

Updates the Pico SDK from 2.2.0 to 2.3.1. Also fixes pinless PIO state machines on RP2350B boards (Metro RP2350, Fruit Jam).

Why

Related to #11098. SDK 2.3 intentionally rejects zero pins on RP2350B (raspberrypi/pico-sdk#2989); pinless callers now use pio_claim_free_sm_and_add_program().

Hardware tested

Board Chip Build Result
Metro RP2350 RP2350B bump only pinless StateMachine 0/10, with pin 10/10
Metro RP2350 RP2350B bump + fix pinless 10/10, with pin 10/10, pinless SM runs and pushes data
Pico 2 W RP2350A bump only boots, REPL, WiFi scan finds 9 networks, board.LED works

Linux host. Control on 10.4.0-alpha.1 (SDK 2.2.0): pinless 10/10.

Board text 2.2.0 text 2.3.1
raspberry_pi_pico 968216 968480
raspberry_pi_pico2 911932 911908
raspberry_pi_pico2_w 1512168 1511880

How I tested it

import rp2pio, array, board
nop = array.array("H", [0xA042])
sm = rp2pio.StateMachine(nop, frequency=100000)   # no pins
sm.deinit()
prog = array.array("H", [0xE047, 0xA0C2, 0x8020])  # set y,7; mov isr,y; push
sm = rp2pio.StateMachine(prog, frequency=100000)
buf = array.array("L", [0] * 4); sm.readinto(buf); print(list(buf))
[7, 7, 7, 7]

Before the fix, the first construct raised RuntimeError: All state machines in use.

Scope

Doesn't use the new SDK sleep features from #11098. Not tested: USB host, PicoDVI, PSRAM, sleep, WiFi connect.

AI assistance

Made with Claude Code. I reviewed the diff and the hardware results above.

🤖 Generated with Claude Code

mikeysklar and others added 2 commits September 19, 2026 05:43
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
pico-sdk 2.3 (raspberrypi/pico-sdk#2989) makes
pio_claim_free_sm_and_add_program_for_gpio_range() return false for a
gpio_count of 0 when PICO_PIO_USE_GPIO_BASE is set, so on RP2350B a
StateMachine that uses no pins could not be constructed. Use
pio_claim_free_sm_and_add_program() when there are no pins.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@dhalbert

Copy link
Copy Markdown
Collaborator

Not tested: USB host, PicoDVI, PSRAM, sleep, WiFi connect.

These should be tested as well as some smoke tests for UART, I2C, etc.

@mikeysklar

Copy link
Copy Markdown
Collaborator Author

Tested each board on main (SDK 2.2.0) and on this PR. Results matched on every test.

Board Tested
Fruit Jam (RP2350B) PicoDVI on a monitor, PSRAM with flash writes, USB host keyboard, I2C, I2S, SD card, PIO, Fruit Jam OS boot
Pico 2 W (RP2350A) WiFi connect 38/40 with HTTP fetch (main 36/40), scan, radio toggle, UART, SPI, PWM, ADC, PIO
Pico W (RP2040) Deep sleep on a power-only supply, woke on TimeAlarm each time, plus light sleep
Metro RP2040 Light sleep, UART, SPI, I2C, PWM, ADC, PIO, flash writes

Sleep is RP2040 only, since CIRCUITPY_ALARM = 0 for RP2350. The WiFi misses were the same error on both builds. Not tested: UART loopback.

@dhalbert dhalbert left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the testing!

@dhalbert
dhalbert merged commit 844fe6f into adafruit:main Sep 20, 2026
175 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants