Skip to content

ArminPP/sdFAT-M5Stack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sdFat running on M5Stack


how to use sdFat library on M5Stack in short.

Table of Contents

About

I would like to use the sdFat library on the M5Stack because I need the long file names.
There were some unexpected issues (for me) that I want to document here.

Usage

The original SD library is integrated in the M5Stack library. The sdFat library can be used in parallel if a few settings are made correctly.

There are 3 files in the src folder, with Arduino IDE they have to be renamed from *.cpp to *.ino.

// in main file define the max SPI speed
#define SPI_SPEED SD_SCK_MHZ(25)                                    // MHz: OK 4, 10, 20, 25   too much: 29, 30, 40,
#define SD_CONFIG SdSpiConfig(TFCARD_CS_PIN, SHARED_SPI, SPI_SPEED) // TFCARD_CS_PIN is defined in M5Stack Config.h (Pin 4)

if (!sd.begin(SD_CONFIG)) {}
// in file SdFat\src\SdFatConfig.h    at Line 100:
#define ENABLE_DEDICATED_SPI 0
sdFat benchmark on M5Stack    
##########################
Type any character to start
File size 5MB        
Buffer size 100 bytes
Starting write test.  Please wait up to a minute
Write 77.38 KB/sec
Maximum latency: 146413 usec, Minimum Latency: 1 usec, Avg Latency: 1291 usec

Starting read test.  Please wait up to a minute
Read 296.52 KB/sec
Maximum latency: 10455 usec, Minimum Latency: 1 usec, Avg Latency: 336 usec

Done


SD benchmark on M5Stack    
#######################
Type any character to start
File size 5MB
Buffer size 100 bytes
Starting write test.  Please wait up to a minute
Write 68.35 KB/sec
Maximum latency: 191672 usec, Minimum Latency: 12 usec, Avg Latency: 1454 usec

Starting read test.  Please wait up to a minute
Read 258.91 KB/sec
Maximum latency: 3927 usec, Minimum Latency: 9 usec, Avg Latency: 382 usec

Done

Acknowledgements

  • thanks to the makers of M5Stack, I like to have a nice all in one case in my projects :-)
  • thanks to Bill Greiman for the sdFat library https://github.com/greiman/SdFat

About

sdFat running on M5Stack

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published