cancel
Showing results for 
Search instead for 
Did you mean: 

How to connect Detect_SDIO pin using SDMMC1 in SD 4 bit Wide bus mode?

GeneralTao
Associate II

Hello.

I use STM32L452 mcu, STM32CubeIDE 1.3.1, simple SD card on 1 GB.

I want to connect SD card to mcu, using SD 4 bit Wide bus, but I can't understand how to connect Detect_SDIO pin, because this mode needs all 9 pin.

It is a problem, because I wont to connect it, but get FR_DISK_ERR error.

Could Detect_SDIO absence be cause of FR_DISK_ERR?

Thank you for reading.

4 REPLIES 4

The socket detect pin can be any available IO pin, typically the socket grounds the pin when the card is inserted.

The DISKIO layer typically flags a NOT READY type error based on the detected state.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Thank you for so fast reply.

So, I can connect one by D0, D1... to Detect_SDIO?

Huh?

Something like PC3 or PA7, a pin unrelated to the SDIO/SDMMC peripheral.

CLK

CMD

D0

D1

D2

D3

Should have their own connection to the socket.

Card Detect in this context is typically a mechanical switch on the socket frame itself.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
GeneralTao
Associate II

Sorry, I meaned D0, D1, D2 and D3 in SD card. I also connect SD to MCU directly via wires and pinches. So, can I connect, for example, PA7(Detect_SDIO) to D0?