Getting optimal SD card performance

Status
Not open for further replies.

unicornpower

Well-known member
I originally posted this on the Audio Library board but I think I’m actually asking a more general question so have moved it here.

I've written an audio looper for Teensy 3.5/6 which I use live (link below). It uses the inbuilt SD card slot to read write audio and generally works well, but I have issues getting consistent write performance out of the SD cards I'm using (SanDisk or Kingston), and I'm also finding the SD library fails to read the more recent 64GB cards I have (SD.begin() fails).

The issue I have is that most writes of 2 audio blocks (512 bytes) to the SD card takes around 2.5ms, but occasionally it will take around 150ms! This basically blows my buffering system, and means the looper runs out of blocks to play. Leading to horrible glitching.

My questions are:

1. Is there another version of the SD library that is compatible with the Teensy audio library that provides improved write performance?
2. Is there a reason I'm unable to read 64GB SanDisk Extreme cards (is this a FAT issue?), can I resolve this with the standard library?
3. The SDFat library has a way to enable Exclusive SPI mode, which it says yields superior performance, is there a way to achieve this with a library that's compatible with the Teensy audio library?

I'm wanting to use the looper for an imminent performance, so any help would be highly appreciated!

Thanks,
Scott

https://github.com/cutlasses/Looper
https://youtu.be/Ur3xYh8PTQg
 
Status
Not open for further replies.
Back
Top