-
Notifications
You must be signed in to change notification settings - Fork 85
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 #377
base: main
Are you sure you want to change the base?
Conversation
Adding the Assuming that testing goes well, I'll remove the |
There was a problem hiding this 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)
There is already a note about clones:
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! |
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.
…r linter warnings
…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
…just use the ones from europi.py
… to resolve the issue with _thread we were previously encountering
Rebased to latest 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. |
…date branch into here, since they're needed for Pico2 support
@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. |
There was a problem hiding this 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!
- `CPU_FREQ` must be one of `250000000` or `125000000`. Default: `"250000000"` | ||
- `EUROPI_MODEL` specifies the type of EuroPi module. Currently only `"europi"` is supported. Default: `"europi"`. | ||
- `PICO_MODEL` must be one of `"pico"`, `"pico2"`, or `"pico w"`. Default: `"pico"`. | ||
- `CPU_FREQ` specifies whether or not the CPU should be overclocked. Must be one of `"overclocked"` or `"normal"`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Suggestion]
Apologies if I've missed a discussion on this but is there a reason for limiting the user to only discrete values as opposed to the full range? It's a real edge case but I know some people have underclocked the Pico before for power consumption reasons
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was mostly copying what was available in the original version. We probably could add a new underclocked
option at a later date to support that. I'm not sure it's worth including in this merge request, but the framework of CPU frequencies isn't hard to expand on later if we want to add underclocking. I have concerns about what underclocking may do to some scripts, but that's a separate question.
I'm not sure I see much benefit in allowing the full integer range of frequencies; will anyone ever realistically need to control the frequency down to the Hz? Also, specifying the actual frequency assumes the user has referred to the datasheet and knows what the supported frequencies for the processor are. The more-abstract "underclocked/normal/overclocked" option feels easier to understand to me, even though it's less informative.
software/firmware/europi.py
Outdated
@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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
pico2
toeuropi_config.PICO_MODEL
options