Git Product home page Git Product logo

Comments (2)

nox771 avatar nox771 commented on August 18, 2024

DMA mode can be useful to reduce interrupt calls, which could be useful if you have a lot of other interrupt activity already. As an example see the logic analyzer images in this post (click to enlarge):
https://forum.pjrc.com/threads/21680-New-I2C-library-for-Teensy3?p=62411&viewfull=1#post62411
Notice the "I2C0 Interrupt" signal between the Interrupt Mode and DMA Mode plots.

That post is somewhat old, but at the bottom it does explain the workarounds involved in getting DMA mode to work. The short version is DMA mode should only be used on a clean reliable connection, for instance a short wire connection to a I2C display. In those cases the connection could be tuned to give a marginal performance benefit over the interrupt method.

On long-wire, or error prone connections the DMA method could behave inconsistently. In particular Slave NACKs and Timeouts won't behave optimally due to the way DMA hardware ignores bus events (again refer to above post).

Overall I would recommend using ISR unless you need absolute max performance (such as max refresh rate on I2C display), then use DMA. Although it is only one line of code difference between them, so maybe try both out.

from i2c_t3.

bmegli avatar bmegli commented on August 18, 2024

Thanks,

This answers even the questions I didn't yet know I wanted to ask!

Kind regards

from i2c_t3.

Related Issues (20)

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.