Giter Site home page Giter Site logo

rp2040_micropython_dma's Introduction

RP2040_micropython_dma

testing out some (stolen) DMA code for RP2040 Micropython. Heavy inspiration and some code from https://iosoft.blog/2021/10/26/pico-adc-dma/

This DMAs into a PIO TX FIFO. It should work on almost any PIO program. RX FIFOs can be made to work.

Now implemented control blocks so there's one DMA chain that can DMA into another to restart it (or start it at another point). This doesn't allow infinate looping (you'd need the interrupts for that).

Actually, you can (sort of) do infinate transfers. You can reset the read address of the control channel while the other channel is running. Since this only has to happen within the window of the entire control chain, you likely have several seconds to reset it, so it ends up being very non-time specific. I've added the reset() method for this. Is it possible for this to go wrong? Maybe? If it reset the transfer address between the two transfers it'd get out of sync, but given that it's an unpaced transfer, it'd have to happen on the exact clock cyle. If you're not willing to take this risk, use C/C++

Limitations

As far as I can see, there's no way to access the DMA interrupts.

rp2040_micropython_dma's People

Contributors

benevpi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.