-
Notifications
You must be signed in to change notification settings - Fork 83
DO NOT MERGE WIP. Add support for external SPI ADC on rp2040 and rp2350 #65
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
Draft
thomasfla
wants to merge
11
commits into
simplefoc:rp2350_current_sense
Choose a base branch
from
thomasfla:rp2350_current_sense
base: rp2350_current_sense
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
DO NOT MERGE WIP. Add support for external SPI ADC on rp2040 and rp2350 #65
thomasfla
wants to merge
11
commits into
simplefoc:rp2350_current_sense
from
thomasfla:rp2350_current_sense
Conversation
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
…itting 64bits per samples, in a ring buffer from witch the CPU can take the last samples.
…dc values from buffer)
I changed it into draft mode - that way it can’t be merged by accident… |
Memory usage change @ 4aa83b6
Click for full report table
Click for full report CSV
|
…n, validated on RP2350 with 3 ADCs
… the loop, only do abc, only 12bits
…sing the same PIO with different state machine, ans also be compatible with other library that uses other PIOs (encoder for example)
Memory usage change @ ff1108c
Click for full report table
Click for full report CSV
|
I was just about to ask you for the #if conditional compilation :-) thanks so much! Thanks for all your amazing effort on this! |
Memory usage change @ 488eff6
Click for full report table
Click for full report CSV
|
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.
Current Sense for RP2350
warning Work in progress
Implementation of current sensing on RP2350 using the PIO to read SPI based ADCs.
Wiring:
Temporarly, for this to work, we need to add a PWM chanell in Arduino-FOC rp2040 hardware specific files. The duty cyctle needs to be computed to trigger the ADC at the right-time.
TODO: