Skip to main content
RN_it
Associate III
July 27, 2018
Question

How can i get SD Card connect and disconnect interrupts

  • July 27, 2018
  • 2 replies
  • 719 views

Hello All,

I want to get an interrupt whenever i connect or disconnect sd card in to sd card slot . How to do this ?

I have stm32f7 discovery board . I searched in hal_sdio.c , but couldnt get any info.

what is the best way to achieve this ? Thank you .

One idea i have is to check card status in the systick handler.

Thanks in advance

    This topic has been closed for replies.

    2 replies

    Clive1 (HNL)
    Explorer
    July 27, 2018

    >>stm32f7 discovery board 

    Which one, be specific

    Usually two methods depending on design, either as a GPIO directly attached to the micro, and generating an EXTI interrupt, or via the MFX (IO Expander), which can be configured at a pin level to cause interrupts, via a GPIO/EXTI source for a pin connected to the MFX.

    Perhaps look at the examples in the Applications\Display or Example\JPEG directories for examples using the SD Card and implementing the card checking. Or within the SD BSP code for the board.

    RN_it
    RN_itAuthor
    Associate III
    August 4, 2018

    Hi Clive ,

    Thanks for the reply, actually i am using this board

    https://www.st.com/en/evaluation-tools/32f746gdiscovery.html

    Usually two methods depending on design, either as a GPIO directly attached to the micro, and generating an EXTI interrupt

    but the sd connector on this board is not connected to any gpio, and how the voltage level changes during insertion and removal of the card to trigger the exti interrupt .