Comments (5)
The timeout likely occurs in one of two places, here or here.
You can try adjusting them here.
I don't want to change them since some older cards are detected by CMD8 failure and older cards take longer to init by ACMD41. If you only use newer cards, smaller values should be OK.
from sdfat.
Thanks for that, I'll give those a try!
Any idea what the difference is between the Teensy 3.5 and 4.1 is on this front? The 3.5 seems to be nearly instant if no card is present, so it was surprising to see the much longer timeout on the 4.1. I had assumed they would be quite similar.
from sdfat.
Any idea what the difference is between the Teensy 3.5 and 4.1 is on this front?
The controllers are very different. Notice all the defined macros in the driver:
Line 25: #if defined(__MK64FX512__) || defined(__MK66FX1M0__) || defined(__IMXRT1062__)
Line 77: #if defined(__MK64FX512__) || defined(__MK66FX1M0__)
Line 96: #elif defined(__IMXRT1062__)
Line 119: #endif // defined(__MK64FX512__) || defined(__MK66FX1M0__)
Line 326: #if defined(__IMXRT1062__)
Line 333: #if defined(__MK64FX512__) || defined(__MK66FX1M0__)
Line 358: #elif defined(__IMXRT1062__)
Line 372: #if defined(ARDUINO_TEENSY41)
Line 374: #else // defined(ARDUINO_TEENSY41)
Line 376: #endif // defined(ARDUINO_TEENSY41)
Line 413: #endif // defined(__MK64FX512__) || defined(__MK66FX1M0__)
Line 426: #if defined(__IMXRT1062__)
Line 433: #endif // defined(__IMXRT1062__)
Line 491: #if defined(__IMXRT1062__)
Line 595: #if defined(__MK64FX512__) || defined(__MK66FX1M0__)
Line 598: #endif // defined(__MK64FX512__) || defined(__MK66FX1M0__)
Line 612: #if defined(__MK64FX512__) || defined(__MK66FX1M0__)
Line 615: #endif // defined(__MK64FX512__) || defined(__MK66FX1M0__)
Line 866: #if defined(__MK64FX512__) || defined(__MK66FX1M0__)
Line 873: #else // defined(__MK64FX512__) || defined(__MK66FX1M0__)
Line 875: #endif // defined(__MK64FX512__) || defined(__MK66FX1M0__)
Line 968: #if defined(__MK64FX512__) || defined(__MK66FX1M0__)
Line 974: #endif // defined(__MK64FX512__) || defined(__MK66FX1M0__)
Line 1010: #if defined(__IMXRT1062__)
Line 1013: #else // defined(__IMXRT1062__)
Line 1016: #endif // defined(__IMXRT1062__)
Line 1105: #if defined(__MK64FX512__) || defined(__MK66FX1M0__)
Line 1112: #endif // defined(__MK64FX512__) || defined(__MK66FX1M0__)
Line 1161: #if defined(__IMXRT1062__)
Line 1164: #else // defined(__IMXRT1062__)
Line 1167: #endif // defined(__IMXRT1062__)
Line 1175: #endif // defined(__MK64FX512__) defined(__MK66FX1M0__) defined(__IMXRT1062__)
Also there are no pull-ups on the SD socket which seems to cause more problems on the 4.1 with no card.
from sdfat.
Thanks Bill, really appreciate the reply. I did see there were a lot of differences in the driver itself, but the logic used in the begin()
function seemed largely the same between the 2 (ie both use the same number of retries and timeout duration) so I wasn't sure whether the difference amounted to a hardware one or not.
You can try adjusting them here.
Can confirm that this does indeed change the delay. With no card present, the time the begin() call takes is always (CMD8_RETRIES-1)*BUSY_TIMEOUT_MICROS
uS on the 4.1, which explains the 2s I'm seeing.
It would be great if these variables were made externally available or were an optional parameter on the begin()
function, but understand that's probably not something you'd want to add.
from sdfat.
It would be great if these variables were made externally available or were an optional parameter on the begin() function, but understand that's probably not something you'd want to add.
I have installed board support packages for several hundred boards on my development machine. I have a large bookcase with plastic shoe-boxes full of boards that have been sent to me. It is truly impossible to satisfy all the request I get to expose options people ask for.
There are almost 500 forks of SdFat. Many of these are to install special options.
from sdfat.
Related Issues (20)
- Wrapper to fs::FS to use SDfat in ESPAsyncWebserver HOT 6
- pico-sdk only rp2040 implementation HOT 11
- ESP32 S3 always fails to mount card HOT 10
- Unable to format flat Spiflash module with ESP8266 HOT 4
- Mount issues for a Windows-formatted card HOT 35
- SD NAND XTSD01G (surface mounted chip) not formating HOT 1
- Unable to share the same SPI bus with TFT_eSPI on ESP32 HOT 3
- Problems with multiple SD card HOT 3
- SdFat 2.22 with USER_SPI1 pin + another USER_SPI2 in SPI_Mode3 HOT 2
- Arduino-Pico: huge slowdown with v2.2.2 (vs.2.1.1) HOT 5
- Problem with SdFat and TwoWire instance. HOT 3
- sd.begin(SPI_CONFIG) breaks my DMA ADC datalogger on the SAMD51 HOT 5
- Issue after latest update. HOT 17
- exFat sd cards not working with Sdinfo.ino example, only FAT32 card HOT 7
- Allocating bin file with 0s HOT 2
- CS_Pin has to be driven high on ESP32 (to be low at the SDCARD) because of some logic inbetween HOT 3
- Initialization fails with ESP32 HOT 1
- FsFile::isSystem() is missing. HOT 1
- 2.2.3 fails to compile HOT 10
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 sdfat.