Skip to main content
GeneralTao
Associate II
August 25, 2020
Question

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

  • August 25, 2020
  • 2 replies
  • 2644 views

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.

This topic has been closed for replies.

2 replies

Tesla DeLorean
Guru
August 25, 2020

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 VenmoUp vote any posts that you find helpful, it shows what's working..
GeneralTao
Associate II
August 25, 2020

Thank you for so fast reply.

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

Tesla DeLorean
Guru
August 25, 2020

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 VenmoUp vote any posts that you find helpful, it shows what's working..
GeneralTao
Associate II
August 25, 2020

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?