Hi,
we have ported FatFs R0.13 to our project (we are using Sciopta RTOS). It works at the beginning, we can read and write to our SD card (which is a 512MB SwissBit miscro SD card). we can also access the SD card using SD card reader. However, after some time, the card reader can't recognize the card anymore, then we also see the FR_DISK_ERROR when we debug. Now we have 4 SD cards can't be used with this problem. I also run the function checker for low level disk I/O module (downloaded from on elm-chan.org/.../00index_e.html) on 2 broken SD cards, they failed in different places:
-----------------card 1 ------------------------------------------------------------
TUnitTestDataLogger: test_diskio(0, 3, 0x0800CC0C, 0x00000800)
**** Test cycle 1 of 3 start ****
disk_initalize(0) - ok.
**** Get drive size ****
disk_ioctl(0, GET_SECTOR_COUNT, 0x0800CBD4) - ok.
Number of sectors on the drive 0 is 998912.
**** Get block size ****
disk_ioctl(0, GET_BLOCK_SIZE, 0x800CBD8) - failed.
Size of the erase block is unknown.
**** Single sector write test 1 ****
disk_write(0, 0x800CC0C, 0, 1) - failed.
Sorry the function/compatibility test failed. (rc=6)
FatFs will not work with this disk driver.
... Failed
Error: [Unknown test] Disk driver problem
---------------------------------card 2-----------------------------------------------------
TUnitTestDataLogger: test_diskio(0, 3, 0x0800CC0C, 0x00000800)
**** Test cycle 1 of 3 start ****
disk_initalize(0) - failed.
Sorry the function/compatibility test failed. (rc=2)
FatFs will not work with this disk driver.
... Failed
Error: [Unknown test] Disk driver problem
Now we don't know where to find the root cause, related to RTOS? SPI driver? file system? our own high level code?
Regards,
Tracy