Because of the holidays, TI E2E™ design support forum responses will be delayed from Dec. 25 through Jan. 2. Thank you for your patience.

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RM48L952: SD card is not recognized by SD card reader and FR_DISK_ERROR when debug

Part Number: RM48L952

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

  • Hello Tracy,

    Given that the initial communications and writing to the SD card are working fine, I would suspect that there is something related to sequencing and or file system treatment that is causing the SD card to be corrupted. I am copying one of our engineers with experience with the SD card interfaces in case he might have some suggestions, but, my general thought is that this would need to be debugged at the RTOS or system level. i.e., is a file being left open, is there some card index location that is being overwritten, etc?