SDMMC Card Detection - permanent insertion/removal interrupts

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
Dear XMC community.
I have a problem with SD Card Detection.
I tried to detect SD card presence as described here.
I've enabled SDCD in SDMCC003 App and registered a callback function using SDMMC003_RegisterCallBack for card insertion/removing interrupt as described in SDMMC003.h.
As I could see in debugger these interrupts came permanently and with no dependency of real SD Card insertion/removing. What am I doing wrong?
Maybe I didn't get right how SDCD works because I don't understand sense of SDCD external pin signal. Is it output or input? Where should it be connected? Is it a dedicated pin? As I could see in DAVE it is.
The same question is SD status LED signal - is it dedicated or I can connect it to general purpose LED on Kit?
I'm using Relax Kit with XMC4500 EES-AA. Maybe this is a reason of problem? if yes what workaround could be done? I didn't see anything in XMC4500 Errata Sheets about my problem.
0 Likes
3 Replies
Not applicable
Can anyone tell me something about my problem?
0 Likes
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
Hi Dronchic,

1) SDCD is not connected to the socket of SD card in the relax kit (see the schematic). In general the pin can be connected to the card detection pin of SD card socket but in this board it isn’t/
2) LED pin is not dedicated pin, it can be configured for other function. Pin is consumed by the app only if you enable the function in the app.

Best regards
Travis
0 Likes
Not applicable
Hi Travis,
thanks for your answer!
I just can't understand why additional pin is needed to detect card presence. How insertion/removal interrupt could be generated without SDCD signal?
Could general purpose LED on relax kit be used to show SD status?
0 Likes