Intermittent SD initialization with Teensy 4.1

Status
Not open for further replies.

RHT

New member
I am using the built in SD card on the Teensy 4.1, and it frequently fails to initialize with SD.begin. Sometimes it works and sometimes it doesn't.

chipSelect is set to BUILTIN_SDCARD

Pins 0-23 are used to support the application, pins 24-41 are open.

I have three different Teensy 4.1 units, two of which have 16MB RAM addd and one without. All will sometimes properly initialize a SD card, and all will often fail to initialize.

I have used both the example programs in the SD area, as well as my own code. The result is the same either way.

I have tried multiple SD cards including Sandisk 32GB and Onn 16GB. Same results.

I want to use the SD card to save data from an instrumentation interface application so I can later read it with a PC for analysis.

Any idea what is happening and what to do about it?
 
what version of TeensyDuino?

last tried here was with sdFat-Beta library that worked multiple times, tested with TD 1.54b2. So the T_4.1 hardware works - with a good SD Card.

The card in use and how formatted could be an issue. Also assuring Teensy isn't low on supply power if anything else starting up from shared Teensy power ...

More details could lead to better ideas ...
 
what version of TeensyDuino?

last tried here was with sdFat-Beta library that worked multiple times, tested with TD 1.54b2. So the T_4.1 hardware works - with a good SD Card.

The card in use and how formatted could be an issue. Also assuring Teensy isn't low on supply power if anything else starting up from shared Teensy power ...

More details could lead to better ideas ...


Thanks for the reply. I am using TD 1.53 with the Arduino 1.8.13 IDE.
SD cards are new, formatted for Fat32, and work fine in a PC with a USB card R/W.
Power is from the USB - no external. Seems to have plenty of power as the app also drives a tricolor LED from time to time at full brightness. No noticeable voltage drop either.
 
This is how I start things up with SdFat-beta (in use since June of this year with no issues):
Code:
SD SdFat;
   .
   .
   .
if (SD.begin(SdioConfig(FIFO_SDIO))) {
   .
   .
   .
 
Status
Not open for further replies.
Back
Top