Fast SDCard existence detect

KanyeKanye
Posts: 54
Joined: Mon Dec 05, 2016 12:34 am

Fast SDCard existence detect

Postby KanyeKanye » Fri Jul 26, 2019 12:05 am

If there is no SD Card in the slot, sdmmc_card_init returns (with 0x107) after about 29ms for SDMMC Mode and 21ms for SPI Mode.
It's way too long. How to detect SD card existence faster?
Last edited by KanyeKanye on Fri Jul 26, 2019 10:02 am, edited 1 time in total.

mikemoy
Posts: 626
Joined: Fri Jan 12, 2018 9:10 pm

Re: Fast SDCard existence detect

Postby mikemoy » Fri Jul 26, 2019 8:50 am

don't know why 21ms needs to be faster. A human cannot even react to 21ms.
But anyway, you can read or set up a IRQ to check the SDCard switch on the socket.

KanyeKanye
Posts: 54
Joined: Mon Dec 05, 2016 12:34 am

Re: Fast SDCard existence detect

Postby KanyeKanye » Fri Jul 26, 2019 9:59 am

I have no more pins for CD pin. I store data in the loop and 28ms is much too long for waiting. I believe there is some way (sanding some CMDx command) that would answer immediately on every card.

Who is online

Users browsing this forum: No registered users and 79 guests