Coder Social home page Coder Social logo

Enabling SPI transaction features about sdfat HOT 1 CLOSED

greiman avatar greiman commented on August 24, 2024
Enabling SPI transaction features

from sdfat.

Comments (1)

greiman avatar greiman commented on August 24, 2024

SPI transactions are only required if you access the SPI bus in an interrupt routine for another device. The Arduino implementation of SPI transactions is in the SPI.h library so you must include this file.

I believe SPI transactions is a very bad idea but added it as an option to SdFat because several people thought is would allow adequate access to to SPI devices in interrupt routines. Since you can't interrupt a 512 byte block transfer on an SD, there are still major interrupt latency problems.

If you enable SPI transaction, do not set ENABLE_SPI_YIELD nonzero. This will cause problems for read with some cards.

The best solution would be multiple SPI buses which is common on modern ARM chips like the STM32.

Often, an adequate solution is to use software SPI to avoid the sharing of the hardware SPI bus between interrupt and non-interrupt code. Software SPI can be enabled in SdFat for the SD or you can use my DigitalIO library for software SPI with other devices.

https://github.com/greiman/DigitalIO-beta

from sdfat.

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.