AnsweredAssumed Answered

FATfs Writing Data to Created Files Issue

Question asked by Kyati on Jul 31, 2012
Latest reply on Sep 12, 2012 by wood.andy
Greetings,
I have been working with implementing FATfs for reading and writing to a microSD card. This is being done on an STM32L discovery board in the IAR Embedded Workbench environment.

The issue that I am having is that although the files are being created on the disk, the data that I am trying to write rarely appears in the files, though I have had a few successes. I believe that my setup for the disk write and read routines are correct as I can write and read raw bytes to and from the SD card, as well as my SPI and card connections as initialization and communication of the card can be achieved. I am using a general mount-open-write-close-demount format to attempt these writes.

I'm inquiring if anyone might have any thoughts on why these writes would not consistently happen or some other testing that I might be able to do in order to understand this problem. Stepping through the ff.c code for f_write and f_sync do not go to any obvious error paths and I am unsure what else to try.

Outcomes