Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Raspberry Pi Pico 2, Pico 2 W #377

Open
wants to merge 27 commits into
base: main
Choose a base branch
from

Conversation

chrisib
Copy link
Collaborator

@chrisib chrisib commented Aug 27, 2024

  • Adds pico2 to europi_config.PICO_MODEL options
  • Allows setting the default & 2x overclocked CPU freqency for the RP2350 processor
  • Programming instructions updated to cover Pico 2 setup

@chrisib chrisib added firmware Software related issue improvement Improvement or optimization of an existing feature or script draft Not yet ready to merge labels Aug 27, 2024
@chrisib
Copy link
Collaborator Author

chrisib commented Aug 27, 2024

Adding the Draft label for now; I'm going on holiday for a week, and taking my backpack-sized case with me. I'll be testing out the EuroPi with the Pico 2 installed in it while I'm away to check for any bugs I've missed.

Assuming that testing goes well, I'll remove the Draft tag when I'm back.

Copy link
Collaborator

@roryjamesallen roryjamesallen left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for adding!

Could possibly do with adding a note in the BOM that the Pico 2 is supported along with any other RP2040/RP2350 clones that have an identical pinout to the original Pico (at the user's own risk)

@chrisib
Copy link
Collaborator Author

chrisib commented Aug 28, 2024

Could possibly do with adding a note in the BOM that the Pico 2 is supported along with any other RP2040/RP2350 clones that have an identical pinout to the original Pico (at the user's own risk)

There is already a note about clones:

Note: Any official version of the Raspberry Pi Pico will work (W, H, or WH). Third party RP2040 boards may work, but there is no guarantee - always double check the pinout

I can add another line about the Pico 2 being usable with additional configuration.

@roryjamesallen
Copy link
Collaborator

Could possibly do with adding a note in the BOM that the Pico 2 is supported along with any other RP2040/RP2350 clones that have an identical pinout to the original Pico (at the user's own risk)

There is already a note about clones:

Note: Any official version of the Raspberry Pi Pico will work (W, H, or WH). Third party RP2040 boards may work, but there is no guarantee - always double check the pinout

I can add another line about the Pico 2 being usable with additional configuration.

Ah my bad, I forgot about the original BOM note. That addition is perfect!

@chrisib
Copy link
Collaborator Author

chrisib commented Sep 1, 2024

Had to disable the temperature check in the diagnostic script because of micropython/micropython#15687

Hopefully we can re-enable this feature later.

…actual frequency, add "pico2" as a new value for PICO_MODEL
… I'm waiting for mine to ship and this is all considered placeholder for now.
…t hang on the RP2350. Hopefully this can be reverted with a future RP2350 Micropython implementation (breaks in 1.24.0-preview.201)
…o 2; it's not currently usable and causes an unhandled exception when used
…g new ones. Ask for 5 and 10V for the simple calibration, but support skipping if the rack can't supply one or the other (most cases should be able to produce at least one). Allow skipping voltages during advanced calibration too
…strings, remove unused functions. Print the desired voltage with 1 decimal place and units
… to resolve the issue with _thread we were previously encountering
@chrisib
Copy link
Collaborator Author

chrisib commented Nov 5, 2024

Rebased to latest main after multiple other merges (mostly contrib scripts, but a few firmware changes too)

A few issues, like the temperature sensor and USB-connected detectors, are fixed in the Calibration update (#379), so I'll keep this as a draft until that gets merged.

@chrisib
Copy link
Collaborator Author

chrisib commented Nov 9, 2024

@roryjamesallen: I've made a few changes since you gave your approval. Rather than tying this up waiting for the calibration update, I've copied the relevant changes from over there into this branch.

I think we're in a state where we can merge this in; I've been using one of my EuroPi modules with the RP2350 in it full-time for a few months without any issues.

I'll hold off merging until you have a chance to re-approve since there have been changes though.

@chrisib chrisib removed the draft Not yet ready to merge label Nov 9, 2024
Copy link
Collaborator

@roryjamesallen roryjamesallen left a comment

Choose a reason for hiding this comment

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

I haven't tested anything on the module, only added a few small spelling comments. If you've been using it for a while and anyone else has tested it then I'm happy to merge!

software/CONFIGURATION.md Outdated Show resolved Hide resolved
software/CONFIGURATION.md Show resolved Hide resolved
software/firmware/europi.py Show resolved Hide resolved
software/firmware/europi.py Outdated Show resolved Hide resolved
@return The current temperature in Celsius, or None if the hardware did not initialze properly
"""
if self.pin:
# see the pico's datasheet for the details of this calculation
Copy link
Collaborator

Choose a reason for hiding this comment

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

[Spelling]
Capital letter for See and Pico

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done, though this comment was copied verbatim from the diagnostic script. How picky are we in general about punctuation and caps in explanatory comments?

software/programming_instructions.md Outdated Show resolved Hide resolved
@chrisib
Copy link
Collaborator Author

chrisib commented Dec 8, 2024

Since this is still open I've made a few formatting changes (more named constants, fewer string literals), added support for underclocking, and added the Pico 2W to the supported models.

@chrisib chrisib changed the title Add support for Raspberry Pi Pico 2 Add support for Raspberry Pi Pico 2, Pico 2 W Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
firmware Software related issue improvement Improvement or optimization of an existing feature or script
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants