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 other ADC modes: free-running, FIFO #322

Closed
9names opened this issue Apr 2, 2022 · 4 comments
Closed

Add other ADC modes: free-running, FIFO #322

9names opened this issue Apr 2, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@9names
Copy link
Member

9names commented Apr 2, 2022

The current ADC implementation in the HAL only provides support for blocking one-shot samples.

Tasks:

  • Provide an API to configure the ADC into free-running mode.
  • Provide an API to configure the ADC sample FIFO, pacing timer, round-robin sampling and right shift options.
  • Add an example showing off each mode added
@9names 9names added enhancement New feature or request good first issue Good for newcomers labels Apr 2, 2022
@9names
Copy link
Member Author

9names commented Apr 2, 2022

@9names
Copy link
Member Author

9names commented Apr 2, 2022

There is no example in the C SDK for capturing multiple channels or handling the samples in the interrupt handler, though they do have one that uses DMA to capture the data

@riskable
Copy link

riskable commented Apr 4, 2022

Free-running mode support would be fantastic! Very much looking forward to this feature.

For reference, "the plan" is to hook up an analog multiplexer to a single analog pin on the RP2040 and then hook up additional multiplexers to each channel of the one that's connected to the RP2040 (i.e. multiplexers through a multiplexer). In free-running mode (without round-robin) this should--in theory--allow one to effectively bypass the RP2040's internal ADC MUX and replace it with an external one with the fastest performance possible... No need to issue blocking calls that tell the RP2040 which ADC pin to read from and enable non-blocking reads (well, reads that don't require 96 cycles).

Hopefully that'll be possible 😄

@9names 9names mentioned this issue Apr 12, 2022
@9names 9names removed the good first issue Good for newcomers label Apr 13, 2022
@9names
Copy link
Member Author

9names commented Jul 12, 2023

Resolved by #626 and #636

@9names 9names closed this as completed Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants