9 years, 1 month ago.

SDCard Insert detection problem

Hi Neil,

I've probably saw some of my other posts about RTOS SDCard issues, but here is another one ...

Since you new refactoring version provides SD_CD Insert Detection, I gave it a try. Unfortunately, as soon as I provides the P1_25 pin name and SWITCH_NEG_NO to the constructor, the whole CPU hangs, even before reaching the main(). If I leave defaults in the constructor, it works normally ... Any ideas ?

Question relating to:

A re-written SDFileSystem library with improved compatibility, CRC support, and card removal/replacement support. fatfilesystem, MMC, SD, SD Card, SDHC, SDXC

Martin, You don't say which board you are using. The pin you use needs to be interrupt capable.

posted by David Fletcher 27 Mar 2015

Hi David, The board is a custom one using LPC1768. I've verified the pin state with DigitalIn(P1_25), and the contact is SWITCH_NEG_NO. But unfortunately, as soon as I provide those to the constructor, the CPU hangs.

posted by Martin Ayotte 27 Mar 2015

1 Answer

9 years, 1 month ago.

Please re-read my comment above. Only pins on ports 0 and 2 can be used as interrupts, if i read the user manual correctly!

Accepted Answer

Thanks, David, for clarifications. Unfortunately, I choose this pins because I was inspired by a chinese board which use this pins simply because it was nearby the SPI. This means I will have to fix that in next PCB revision.

posted by Martin Ayotte 30 Mar 2015