Folks,
I'm on my second PCB design using an SD card with the Teensy 4.0, and I can not figure out what is wrong. A partial schematic for the PCB is this:
The data sheet for the SD card is here:
https://datasheet.lcsc.com/lcsc/2112141630_SOFNG-TF-013_C444917.pdf
The complete schematic is a bit more complex and is:
A pdf of the schematic is here:
https://github.com/owhite/data_logger/blob/main/V1.1/data_logger.pdf
The PCB layout is here:
https://i.imgur.com/x3KWj10.png
I've been using the examples of Paul's SD programs:
https://github.com/PaulStoffregen/SD/tree/Juse_Use_SdFat/examples
The code always hangs at sections like:
CS pin is set with:
The SD card DOES works fine in a teensy 4.1 with:
I would really appreciate some help. I have testing equipment such as voltmeter & scope.
thanks in advance.
I'm on my second PCB design using an SD card with the Teensy 4.0, and I can not figure out what is wrong. A partial schematic for the PCB is this:
The data sheet for the SD card is here:
https://datasheet.lcsc.com/lcsc/2112141630_SOFNG-TF-013_C444917.pdf
The complete schematic is a bit more complex and is:
A pdf of the schematic is here:
https://github.com/owhite/data_logger/blob/main/V1.1/data_logger.pdf
The PCB layout is here:
https://i.imgur.com/x3KWj10.png
I've been using the examples of Paul's SD programs:
https://github.com/PaulStoffregen/SD/tree/Juse_Use_SdFat/examples
The code always hangs at sections like:
Code:
if (!card.init(SPI_HALF_SPEED, chipSelect)) {
Serial.println("initialization failed. Things to check:");
Serial.println("* is a card inserted?");
Serial.println("* is your wiring correct?");
Serial.println("* did you change the chipSelect pin to match your shield or module?");
return;
} else {
Serial.println("Wiring is correct and a card is present.");
}
CS pin is set with:
Code:
chipSelect = 10;
The SD card DOES works fine in a teensy 4.1 with:
Code:
chipSelect = BUILTIN_SDCARD;
I would really appreciate some help. I have testing equipment such as voltmeter & scope.
thanks in advance.