2025-05-13 11:38 PM
Hi Mike,
Thanks again for your previous support on the SPI interface.
I have since moved to using the SDMMC interface instead of SPI for better performance, but I am still facing issues.
Current Issue Summary:
I can successfully mount the 32GB SDHC FAT32 card and read the capacity using FatFs.
However, f_write always fails.
After debugging, I found that BSP_SD_WriteBlocks fails when writing to LBA 32768.
I also verified this with direct HAL_SD_WriteBlocks, which fails at LBA 32768 but works on lower LBAs like 0 or 1.
This suggests the problem is not in FatFs logic, but rather in high LBA (large address) block access stability.
My Questions:
Is this a known limitation with STM32H7 SDMMC or HAL drivers when writing to higher LBA regions on large-capacity SD cards (like 32GB)?
Looking forward to your insights.
Best regards,
Han