cancel
Showing results for 
Search instead for 
Did you mean: 

FATFS on SD-CARD writing problem

Ofer
Associate III
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
1 REPLY 1
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
Up vote any posts that you find helpful, it shows what's working..