Repository navigation
Zephyr port: three fixes for Raspberry Pi boards - #11573
Merged
Merged
Conversation
Zephyr names these boards after the base Pico and Pico 2, because the W is a board variant and its board.yml full_name has no variant. The banner, USB product string and board_info then lose the W. Set NAME in circuitpython.toml, as the Adafruit zephyr boards do, to match the names the raspberrypi port uses. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
On RP2040, microcontroller.reset() restarted the CPU but the board never left the USB bus: the host kept the same device number and only issued a bus reset to recover. sys_reboot() ends in the Arm SYSRESETREQ, which on RP2 does not reset the USB controller. Reset the chip through the watchdog with every power-on state machine domain but the oscillators selected. This matches pico-sdk's watchdog_reboot(0, 0, 0), which the raspberrypi port's reset_cpu() uses, except that it leaves the debug-pause bits alone; those only pause a counting watchdog, not an immediate trigger. scratch[4] is cleared so the boot ROM takes the normal flash boot. The guard covers RP2350 too, using the same registers; only RP2040 was tested on hardware. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The RP2 hwinfo driver returns an 8-byte ID: the flash unique ID, or the chip ID on RP2350 with CONFIG_HWINFO_RPI_PICO_CHIP_ID. Every SoC but nRF got the 32-byte placeholder length, so cpu.uid on a Pico W was the ID followed by 24 zero bytes. Use 8 bytes, matching the raspberrypi port's cpu.uid on the same boards. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Raspberry Pi boards on the Zephyr port now match the regular CircuitPython build.
Why
Each of these behaved differently there, which confuses tools and users.
Raspberry Pi PicoRaspberry Pi Pico W6/6Raspberry Pi Pico 2 Wcpu.uidlengthmicrocontroller.reset(): host sees the board reseton_next_reset(BOOTLOADER)/UF2, then resetThe web workflow
UIDdrops from 64 to 16 hex digits.Pico, Pico 2 and Feather RP2040 are build-tested only.
Written with Claude; tested on hardware by me.
🤖 Generated with Claude Code