2022-08-04 09:27 AM
But it is normal to write single blocks continuously (cmd24), but the speed is a little slow. I use FatFs to write multiple blocks (cmd25) to SD card. I can only create a new TXT file, but there is no data in it. And when writing multiple blocks, the SD card always returns BSP_ SD_ Other_ Error, this bothered me for a long time.The procedure is as follows:
Solved! Go to Solution.
2022-08-04 11:13 AM
My preference is to use parts with an SDIO or SDMMC peripheral that clocks rapidly and manages the protocol level stuff more cleanly/directly.
ST has posted some SPI based examples within the Cube packages, generally in the form which supports an Adafruit shield. I have commented on occasion that there are some bugs in the multi-sector implementation, but I haven't followed up on that in recent years as my interest level with SPI connectivity is pretty low, and I'd need to be paid to wade into that with my time. Anyway the forum posts probably still exist, and you might have luck with the search function on the forum, or more broadly with Google.
STM32Cube_FW_F7_V1.16.0\Drivers\BSP\Adafruit_Shield\stm32_adafruit_sd.c
2022-08-04 11:13 AM
My preference is to use parts with an SDIO or SDMMC peripheral that clocks rapidly and manages the protocol level stuff more cleanly/directly.
ST has posted some SPI based examples within the Cube packages, generally in the form which supports an Adafruit shield. I have commented on occasion that there are some bugs in the multi-sector implementation, but I haven't followed up on that in recent years as my interest level with SPI connectivity is pretty low, and I'd need to be paid to wade into that with my time. Anyway the forum posts probably still exist, and you might have luck with the search function on the forum, or more broadly with Google.
STM32Cube_FW_F7_V1.16.0\Drivers\BSP\Adafruit_Shield\stm32_adafruit_sd.c
2022-08-04 07:56 PM
Thank you so much for your multi-testing help. Because my MCU is STM32WB55RGV6, there is no SDIO, only SPI.
The spi driver file I use is also the same, but it still writes a single block (cmd24) multiple times instead of writing multiple blocks continuously (cmd25).