2024-05-29 09:17 PM
we are using stm32f103c8t6 and stm32f407vet6 microcontrollers. we were able to communicate with sandisk and other brand sdcards but hp sdcard (Class 10, UHS-I, U1) is not communicating . hp sdcard working with card reader and we have formatted in FAT32 format in hp sdcard. please provide the solution for this issue. we are using stm32cube ide and hall library.
2024-05-30 01:42 AM
Hello @Sansel
What is the error you are getting? Are you using SDIO or SPI driver?
Could you please share with us the content of SDIO or SPI register when getting the error?
2024-05-30 02:27 AM - edited 2024-05-30 02:28 AM
>we were able to communicate with sandisk and other brand sdcards but hp sdcard (Class 10, UHS-I, U1) is not communicating
Solution : dont use this "hp" card.
Where you buy it ? (google shows no source for sd-cards by hp ! )
So maybe same fake product, like my "Lenovo" sd-card from aliexpress (google shows no source for sd-cards by Lenovo ! )
2024-05-30 06:42 AM
Hi [Saket_Om],
Thank you for your inquiry regarding the error we are encountering.
### Driver in Use We are using the **SDIO driver** to interface with the SD Card.
void MX_SDIO_SD_Init(void) {
hsd.Instance = SDIO;
hsd.Init.ClockEdge = SDIO_CLOCK_EDGE_RISING;
hsd.Init.ClockBypass = SDIO_CLOCK_BYPASS_DISABLE;
hsd.Init.ClockPowerSave = SDIO_CLOCK_POWER_SAVE_DISABLE;
hsd.Init.BusWide = SDIO_BUS_WIDE_1B;
hsd.Init.HardwareFlowControl = SDIO_HARDWARE_FLOW_CONTROL_DISABLE;
hsd.Init.ClockDiv = 5;
if (HAL_SD_Init(&hsd) != HAL_OK) { Error_Handler(); } // Enable wide bus operation (4-bit mode)
if (HAL_SD_ConfigWideBusOperation(&hsd, SDIO_BUS_WIDE_4B) != HAL_OK)
{ Error_Handler(); }
}