SD card error (FR_DISK_ERROR) with Chan's FATFS

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SD card error (FR_DISK_ERROR) with Chan's FATFS

1,709 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by arvind.k08 on Mon Aug 10 22:02:32 MST 2015
Hi,

I am using SDcard via MCI interface on our custom board with LPC1778.
For read/write on SD card I am using Chan's Fatfs (v 0.10b).
SDcard used: Sandisk Ultra, 8 Gb, class 10

Here I am using SD card for data logging where it fails many times.
My requirement is to log data coming from another chip. I am writing data to the SD card every second.
The data to write is around 4000 bytes. I am writing these data in SDcard, But sometimes while writing [function: f_write()], it fails with FR_DISK_ERR frequently and further if I am trying to write it fails FR_INVALID_OBJECT.
It works only after I do f_close() and again f_open(), which is more addon to to code, I feel I might loose the data coming from another chip.

Please suggest a way how to handle these SD card errors, specially FR_DISK_ERR, so these errors should not come again and again so frequently. It has become a major block for my application.


Regards,
Arvind



Labels (1)
0 Kudos
1 Reply

934 Views
chakravarthi
Contributor I

please help me if you have solved the disk error problem.I  am also facing same problem when i try to write the data to more than 4 GB cards.i am successfully writing the data to below 4 GB  size cards without any error. help me my target device is  1778.

0 Kudos