Comments (2)
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.
Thanks,
This answers even the questions I didn't yet know I wanted to ask!
Kind regards
from i2c_t3.
Related Issues (20)
- Using Wire with multiple devices HOT 4
- Not an issue, but a question: Avoid memory issues due to virtual double buffering? HOT 2
- Does this library utilize any filters like Kalman filter?
- I2C Master Issue HOT 3
- MiCS-6814 with i2c_t3 library
- Are asynchronous callbacks called from interrupt? (documentation) HOT 2
- setSCL()/setSDA()/pinConfigure() don't work properly HOT 5
- Licensing question HOT 10
- Teensy 3.6 multi-master configuration not working. HOT 2
- Wire.end() not implemented HOT 4
- Teensy 4.0 HOT 4
- Wire status question HOT 1
- I2C Slave Receive Buffer HOT 4
- Is there a way to undo the effects of Begin? HOT 4
- Wire.write multiple bytes
- Interrupts either not running and/or call wrong function. HOT 2
- Document glitch filter values HOT 1
- Incorrect order of operations? HOT 2
- Simultaneous HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from i2c_t3.