Skip to main content
Explorer
February 10, 2022
Solved

We are trying to to read and write to a SD card. We are using the STM32F50N8. Find below attached the schematic for the SD card and the GPIO. We have set it up the same we as mentioned here (SD 4 bit wide mode) - https://www.youtube.com/watch?v=

  • February 10, 2022
  • 3 replies
  • 1068 views

Hi,

We are trying to to read and write to a SD card.

We are using the STM32F50N8. Find below attached the schematic for the SD card and the GPIO.

We have set it up the same we as mentioned here (SD 4 bit wide mode) - https://www.youtube.com/watch?v=I9KDN1o6924&ab_channel=STMicroelectronics

However, FR returns not ready.

Can you please advice us on how to fix this.

Many thanks, 0693W00000JPK4OQAX.png0693W00000JPK4JQAX.png

    This topic has been closed for replies.
    Best answer by PMold.1

    For this project I was using FreeRTOS. Hence, the issue.

    All I had to do to fix it was to increase the stack size of the task.

    3 replies

    Graduate II
    February 10, 2022

    What's an STM32F50N8 ? a STM32F750N8?

    Not Ready typically comes from not having the right GPIO associated GPIO_SDMMC_DET, and that is properly initialized.

    Check that it goes low properly when the card is present, that you need the PULL-UP enabled, as you don't have an external one. You can remove the checking code also if the pin doesn't report correctly

    Also no external pull-ups on the D0,D1,D2,D3,CMD card side, would have suggested those, so definitely ensure the internal pull-ups on STM32 side.

    PMold.1Author
    Explorer
    February 10, 2022

    Sorry STM32F750N8. I made these external pull ups with 10K resistors. I also added a pull up to the GPIO_SDMMMC_DET line and it goes low when the SD card is inside. I also made the internal pins to pull up as shown below. However, it still returns not ready. The line it breaks on is attached below.0693W00000JPLioQAH.png 

    0693W00000JPLjcQAH.png 

    0693W00000JPLk6QAH.png

    PMold.1AuthorAnswer
    Explorer
    February 14, 2022

    For this project I was using FreeRTOS. Hence, the issue.

    All I had to do to fix it was to increase the stack size of the task.