We have been facing some trouble using the SD card library to read and write data to and from an SD card with an STM32F429ZI.

Thread Starter

somyaV

Joined May 13, 2020
1
We have been facing some trouble using the SD card library to read and write data to and from an SD card with an STM32F429ZI. We are using the ff.h FatFs - Generic FAT file system module R0.12c library. What we have observed is that after a few reads and writes, the STM goes into a hard fault crash or a FR_DISK_ERR is returned. This was observed while running the debugger. We have tried multiple ways, even mounting the SD card and unmounting it before and after every read/write attempt. We have tried with 2gb and 4gb sd cards. The SD card used was formatted using both FAT default and FAT32.
 

ci139

Joined Jul 11, 2016
1,898
i donno too much about but some issues may rise from https://en.wikipedia.org/wiki/SD_card#Card_security
... more likely the MCU or PCB/wiring has a sync. issues . . . disable all MCU interrupts for the time of the SD access -- double check the I/O pins reconfiguration routines and the delays involved . . . also (the timings) that (are) specified for the particular SD card/controller

i have done random reading on the subject but not lately

http://academy.cba.mit.edu/classes/networking_communications/SD/SD.pdf
https://www.google.com/search?q=io+sd+speed+test+"access+mode"
 
Last edited:
Top