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

ADC circular DMA transfer with multiple channels #396

Open
ost-ing opened this issue Oct 25, 2022 · 2 comments
Open

ADC circular DMA transfer with multiple channels #396

ost-ing opened this issue Oct 25, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@ost-ing
Copy link
Contributor

ost-ing commented Oct 25, 2022

I'm wondering if the current implementation allows for a circular DMA transfer using multiple channels.

E.g. I basically want to convert this from blocking to circular DMA:

        let a: u32 = self.adc.read(&mut self.pins.0).unwrap();
        let b: u32 = self.adc.read(&mut self.pins.1).unwrap();
        let c: u32 = self.adc.read(&mut self.pins.2).unwrap();

As I understand only one buffer can be nominated for the transfer, I would be happy if the solution could utilize some kind of round-robin sharing of one buffer - if that's feasible.

Any assistance appreciated, once again!

Thanks

@richardeoin
Copy link
Member

This sounds very useful, but I don't think it's supported currently. It would need a new version of the start_conversion_dma method to setup the ADC peripheral to setup round-robin sampling

@richardeoin richardeoin added the enhancement New feature or request label Dec 5, 2022
@dobrite
Copy link

dobrite commented Jul 28, 2023

I'm unsure if this draft PR is exactly what this improvement had in mind, but it definitely allows for circular DMA transfer using multiple channels!

I'm looking for feedback for improvements, so if y'all have any, feel free to comment!

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

3 participants