Teensy 3.5 SD-Card - mechanical issue?

Status
Not open for further replies.

schlank

Active member
Hello!

I am using <SdFat.h> in a project to read a config.txt.
This worked well and I handed it over to a customer. Now it is not working anymore but the code was not changed.
Code:
sd.begin(SD_CONFIG);
with
Code:
SD_CONFIG SdioConfig(FIFO_SDIO);
returns false.

My guess is that it is a problem with the SD-Card reader? Is this a know issue?


Have a nice day

Schlank
 
SdFat with SdioConfig(FIFO_SDIO) definitely works. No known issues there.

Teensyduino 1.54 started including SdFat 2.05. Versions 1.53 and earlier didn't include any copy of SdFat, but of course it was always possible to install SdFat yourself and use it. If you're using 1.54 and your code was developed using an older version of SdFat, perhaps something else about your code than these 2 lines somehow depends on an earlier version? I hope you can see this is straying pretty far from known issues into sheer guesswork about your code and even which version of the software and SdFat library you're actually using.

In Arduino, click Help > About to check which version of Teensyduino. In File > Preferences, you can enable verbose output during compilation. Then when you compile, Arduino will tell you the exact path of the SdFat library it actually used, and if you have any other copies it ignored, it will tell you about those. This info can be critically important if you have a compatibility issue with a new vs old version of SdFat, and both happen to be installed on your computer in different folders!
 
Hi!
I am using Teensyduino 1.53 and compiler tells me about this Version:

Alternatives for SdFat.h: [SdFat@2.0.5]
ResolveLibrary(SdFat.h)
-> candidates: [SdFat@2.0.5]

Should I update to 1.54?
 
Maybe first click File > Examples > SD > listfiles. Edit the chip select pin to BUILTIN_SDCARD (refer to the comments for details).

At least run that known-good example to check whether it can access your SD card.
 
It was (as often) a stupid bug: in the folder was a hidden file and the code tried to open this file and not the config.txt
Working with SD-Cards can be nasty!

But thanks for you quick reply!
 
I'd advise always disabling file-hiding in any OS you use, otherwise it will bite you one day.
 
Status
Not open for further replies.
Back
Top