2020-12-12 12:16 PM
Hi All,
I have been breaking my head the past few weeks trying to connect an SD card to the STM32H723ZG with no success.
My setup is simple:
HW configure is seen in this image:
using 1 wire SDIO with this configuration everything works well.
using 4 wire SDIO we I get an CRC fail inside the HAL_SD_ReadBlocks function .
basically before the main loop and after the peripheral are configure I am trying to run this code:
retVal = HAL_SD_Init(&hsd1);
if(retVal == HAL_OK) printf("HAL_SD_Init OK\r\n");
retVal = HAL_SD_ReadBlocks(&hsd1, buff, 0, 1, HAL_MAX_DELAY);
if(retVal == HAL_OK) printf("HAL_SD_ReadBlocks OK\r\n");
but the read function fails on a CRC internally.
Also tried to play with SDMMC clock from clock configuration screen
Also tried to play with the clock div.
Also forced clock to at and run in 400Kbit/s like seen in the initCard fucntion.
Any ideas what to do now?
thanks!
Dan
2020-12-15 11:08 AM
bumping up
2020-12-15 12:03 PM
Sorry not a CubeMX adherent.
I have SDMMC/FATFS working on several of the H7 NUCLEO boards, not sure I've ported it to the H723 board, but I do have one.
Electrically the 4-bit mode is a lot less forgiving, but if the socket/wiring has been tested/proven elsewhere it should work here.
Double check the TRANSCEIVER is not used/enabled in the H7 driver code.
2022-08-23 12:00 AM
Hi @DYeru.1,
did you by any chance solved this issue? I have exactly the same problem, SD card is working in 1 wire mode but CRC fails in 4 wire mode.
2022-12-26 04:52 AM
@heveskar , @Community member , @DYeru.1
Hello everyone,
may you please confirm, how you shorted out this problem.
i have also facing same issue with my project,
my task to run sd card(ver 2.0) with STM32H723VGT6 Micro(100 Pins) to audio record and play back purpose!
kindly please confirm/share related connection diagram/exact schematic /related reference.
Thanking you
india_nik@ymail.com
2022-12-27 05:25 PM
Pins, look reasonable enough
PB13 D0 (AF12)
PC9 D1
PC10 D2
PC11 D3
PC12 CLK
PD2 CMD
PA8 DET
PA7 SD_ENB << Is this used/required
2023-01-03 09:40 PM
AF12...?
all above pins have externally pull up ,is it correct connection?
2023-01-04 10:07 AM
The schematic in the top post looks consistent with other working designs.
Yours looks reasonable too. Probably would skip the pull-up on the CLK.
Watch for line lengths, keep them consistent, avoid stubs. The PCB implementation is important.
AF12 is the Alternate Function which is different/special compared to other pins, watch that in the pin level configuration. And the GPIO banks whose clocks are enabled.
For short traces, I'd probably look to reduce the SPEEDR setting, if the slew rate is too aggressive then the lines will likely ring. Above 33 MHz clocking, I'd probably consider 27/33R series resistors.
Do some debugging, understand what specifically is failing, look at status/error returns.
Debug the DISKIO layer first. Make sure the READ functionality is solid first.
2023-01-04 10:08 AM
Is 3.3V SD gated via PA7 SD_ENB ??
2023-01-28 09:59 PM
Hi Tesla,
Actually,Issue are coming same at the point of,when i runing the code for STM32H723VGT6 Controller...
errorstate are coming 4(0x04),which not defined by CubeMx Lib. !
"STM32H743XI SDMMC1 SD Card - HAL_SD_ERROR_UNSUPPORTED_FEATURE"
/* SEND CMD55 APP_CMD with RCA as 0 */
errorstate = SDMMC_CmdAppCommand(hsd->Instance, 0);
if (errorstate != HAL_SD_ERROR_NONE)
{
return HAL_SD_ERROR_UNSUPPORTED_FEATURE;
}
}