2023-10-31 01:01 AM
i get `FR_NOT_READY`, `HAL_SD_ERROR_REQUEST_NOT_APPLICABLE` errors .
/* If requested card supports wide bus operation */
if((scr[1U] & SDMMC_WIDE_BUS_SUPPORT) != SDMMC_ALLZERO)
{
//...
return HAL_SD_
return HAL_SD_ERROR_REQUEST_NOT_APPLICABLE;
}ERROR_NONE;
}
else
{
How do I fix this and make SD card work with 4bits wide bus?
sd card scematic (part number-GTFP08431BEU)
Microcontroller scematic -
2023-11-06 05:33 AM
The exact san disk model? (So I can look at the datasheet)?
Possible to add a picture of the physical setup? Wires etc.
.IOC file pictures of:
- FATFS Platform settings
- SDIO GPIO settings
2023-11-06 05:47 AM
sandisk model - SDSDQM-008G-B35
sd card schematic-
FATFS Platform setting
SDIO GPIO Setting
2023-11-06 06:00 AM
Hello @Rushikesh1234 ,
When exactly do you get the error? If while opening, you may need to create/format a volume on the logical drive before opening it. Also, it is possible that the issue is linked to your hardware setup. You can check the Getting started with STM32F4xxxx MCU hardware development - Application note section 8.4.1, guidelines are proposed to help with design interface connectivity of SDMMC.
The total capacitance of the SD memory card bus is the sum of the bus master capacitance. CHOST, the bus capacitance CBUS itself and the capacitance CCARD of each card connected to this line. The total bus capacitance is CL= CHost + CBus + N*CCard where Host is STM32F4xxxx, bus is all the signals and Card is SD card.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-11-06 06:27 AM
Your SD card is a class 4. This means that it is capable of 4 MB/s. This means 16 MHz clock with no clock division would probably be to high. You will MAYBE need to test with higher clock division factors.
I can't find a good datasheet of the SD card, but some cards does not support 4-bit (often the slower versions). I have contacted Western Digital to see if they can confirm :)