Skip to main content
Ofer
Associate III
July 16, 2018
Question

FATFS on SD-CARD writing problem

  • July 16, 2018
  • 1 reply
  • 435 views
Posted on July 16, 2018 at 02:07

I use STM32F427 with True Studio as my IDE.

I need storing data on SD-CARD.

I use FATFS as my File System.

My problem is that most of the time the actual written data is not what is written - when trying to open the file I see squares only instead the characters I wrote (the number of squares is equal to the number of characters I wrote).

I must mention that sometimes its OK.

The configuration is like this:

&sharpdefine _USE_LFN 1 /* 0 to 3 */

&sharpdefine _CODE_PAGE 850

&sharpdefine _LFN_UNICODE 0 /* 0:ANSI/OEM or 1:Unicode */

using      

&sharpdefine _USE_LFN 0

didn't solve the problem.

Thanks

#fat-fs #sd-card
This topic has been closed for replies.

1 reply

Tesla DeLorean
Guru
July 16, 2018
Posted on July 16, 2018 at 02:38

LFN and CODE PAGE relates to how the files are named, not the content of the files.

You should validate what the DISKIO layer is doing, what it is physically writing to the medium for the case your are stating, and then what it reads back.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..