-
Notifications
You must be signed in to change notification settings - Fork 504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Long timeout calling begin() on Teensy 4.1 when no card present #479
Comments
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. |
The controllers are very different. Notice all the defined macros in the driver:
Also there are no pull-ups on the SD socket which seems to cause more problems on the 4.1 with no card. |
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
Can confirm that this does indeed change the delay. With no card present, the time the begin() call takes is always It would be great if these variables were made externally available or were an optional parameter on the |
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. |
Calling
sd.begin()
on a Teensy 4.1 without a card present appears to take 2 seconds before it times out and the call returns. Compare this to a Teensy 3.5 where if no card is inserted then the call to .begin() appears to return immediately.This 2s timeout is nearly double the time the call takes when a card is present (Around 1.1s in my testing).
Is it possible to reduce this time on Teensy 4.1 or otherwise detect in advance whether a card is inserted? I'm currently calling this on startup in a sketch, but having a 2s delay when booting isn't ideal.
The text was updated successfully, but these errors were encountered: