GithubHelp home page GithubHelp logo

isabella232 / stm32sd Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stm32duino/stm32sd

0.0 0.0 0.0 98 KB

Enables reading and writing on SD card using SD card slot of the STM32 Board.

C++ 38.26% C 61.74%

stm32sd's Introduction

STM32 SD library for Arduino

With an STM32 board with SD card slot availability, this library enables reading and writing on SD card using SD card slot of a STM32 board (NUCLEO, DISCOVERY, ...). This library is for SD card slots connected to the SDIO-/SDMMC-hardware of the processor. For slots connected to SPI-hardware use the standard Arduino SD library.

This library follow Arduino API.

For more information about it, please visit: http://www.arduino.cc/en/Reference/SD

Dependency

This library is based on FatFs, a generic FAT file system module for small embedded systems.
http://elm-chan.org/fsw/ff

The FatFs has been ported as Arduino library here. The STM32SD library depends on it.

Configuration

FatFs

The FatFs has several user defined options, which is specified from within the ffconf.h file.

This library provides a default user defined options file named ffconf_default.h.

User can provide his own defined options by adding his configuration in a file named ffconf_custom.h at sketch level or in variant folder.

SD

Some default definitions can be overridden using:

SD configurations

  • SD_INSTANCE: some STM32 can have 2 SD peripherals SDMMC1 and SDMMC2, note that this library can managed only one peripheral

    • SDMMC1 (default)
    • SDMMC2
  • SD_HW_FLOW_CTRL: specifies whether the SDMMC hardware flow control is enabled or disabled

    • SD_HW_FLOW_CTRL_ENABLE
    • SD_HW_FLOW_CTRL_DISABLE (default)
  • SD_BUS_WIDE: specifies the SDMMC bus width

    • SD_BUS_WIDE_1B
    • SD_BUS_WIDE_4B (default)
    • SD_BUS_WIDE_8B

SD Transceiver

  • SD_TRANSCEIVER_MODE: specifies whether external Transceiver is enabled or disabled. Available only on some STM32

    • SDMMC_TRANSCEIVER_ENABLE
    • SDMMC_TRANSCEIVER_DISABLE (default)
  • SD_TRANSCEIVER_EN pin number to enable the level shifter

  • SD_TRANSCEIVER_SEL pin number for voltage selection

SD detect and timeout

  • SD_DETECT_PIN pin number

  • SD_DATATIMEOUT constant for Read/Write block

stm32sd's People

Contributors

anhardt avatar fpistm avatar masrodjie avatar per1234 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.