Is there any sd card detect pin for Teensy 3.6 builtin SD Card

Not open for further replies.



I cannot find any information for detecting the presence of an SD card for T3.6's built-in Sdio card slot. I'm aware this can be done with may of the spi card reader modules but I need the additional speed provided by the builtin sd card.

Does anybody know if this is directly wired to any pins on the T3.6 processor, and if so could you give some guidelines on whether I can include an ISR to implement code when the card is detected vs. not detected.

I am using this with a TFT screen so in the absence of a card detect pin the only option I see is to have the Teensy read the card and if an error is returned when reading, then assume the card is removed and enter a reset type screen waiting for a user to touch a button on TFT screen to say it has been inserted. Then I can get it to go through initialization of the SDFat library again and resume operation. However a Card Detect pin on an ISR would be simpler and more reliable in my opinion.

Hopefully, someone can help.

No, sadly there isn't any hardware provision like a physical card detect switch or resistor on a data line. The only viable way is polling by trying to communicate with the card.
Thanks Paul and Frank,

Firstly, I just wanted to say that while this is my first time posting here I've followed 100's of your discussions on forums over the past year/two since I got my first micro-controller and have always found them a great inspiration as well as being a very helpful guide to tinkering with them. So thanks for that and please keep up the excellent work.

Anyway, back to the issue. May be worth noting that I also just came across a thread which is of interest to this topic (link below), specifically a post by posse noting a register on the chip that should be able to report if card is present. However, I believe it needs to be polled rather than the neater implementation of being coupled to an ISR, very much doubt the NVIC has an IRQ for it. Anyway, going to try this out over the weekend and will update thread if successful to further share with others.

Thanks to all for now.
I know this is an old thread, however, you can do sdcard detect with an interrupt.
Works for Teensy 3.5/6 and Teensy 4.0/1 with UHS3 (which properly supports the change detect pin!!!).
Here's my modified Teensy 3.6 for SDcard IRQ detection of card presence.
One extra detail for the Teensy 3.6 only, as it is missing the ground connection. This connection is present on Teensy 4.x. and only required on the 3.6 model.

Side view:

...and zoomed in from above.

Hope this might help someone in the future. Cheers!
Not open for further replies.