Re: Reliability of SD Card
Moderators: David Barker, Jerry Messina
Re: Reliability of SD Card
Dear All (esp Steven),
Hi! Following my previous thread, I have been trying to use the SD card which, I think out of the conventional method. I am trying to use the physical sector of SD card in replacement of EEPROM. I have abandoned the FAT structure and go direct to the low level sector itself.
I have successfully written and read from the SD card. But now I am having another problem.
My initial intention is to read data from a few sectors on the SD card and then transfer the data to an output device. My initial concern was with the speed of transfer as I need to do it as fast as the PIC allows. Now my problem is that what seems to me a failure of the SD card to read reliably. I am repeatingly reading from the SD card very fast, a few sectors at a time. But after a few repeats, the output does not match what it's supposed to be. The SD card sort of hanged. After a few cycles later, it resumed reading normally.
My suspicions are in the
1. Failure of SD card to respond to repeated read in short duration (ms)
2. Read error or checksum error? as I do not use the CRC mechanism
Anyone of you have any experience in this?
BTW, as for the read subroutine and module, I used the exact ReadSector sub provided by Steven. Do you have any comment Steven?
Any suggestions will be welcome. I have run out of ideas.
Regards.
Liak
Hi! Following my previous thread, I have been trying to use the SD card which, I think out of the conventional method. I am trying to use the physical sector of SD card in replacement of EEPROM. I have abandoned the FAT structure and go direct to the low level sector itself.
I have successfully written and read from the SD card. But now I am having another problem.
My initial intention is to read data from a few sectors on the SD card and then transfer the data to an output device. My initial concern was with the speed of transfer as I need to do it as fast as the PIC allows. Now my problem is that what seems to me a failure of the SD card to read reliably. I am repeatingly reading from the SD card very fast, a few sectors at a time. But after a few repeats, the output does not match what it's supposed to be. The SD card sort of hanged. After a few cycles later, it resumed reading normally.
My suspicions are in the
1. Failure of SD card to respond to repeated read in short duration (ms)
2. Read error or checksum error? as I do not use the CRC mechanism
Anyone of you have any experience in this?
BTW, as for the read subroutine and module, I used the exact ReadSector sub provided by Steven. Do you have any comment Steven?
Any suggestions will be welcome. I have run out of ideas.
Regards.
Liak
Dear Steven,
I am using the module you posted on the wiki version 4.0.9. However, I must say that with some modification, but not much; there are lots of low level command which I can only guess to understand; except to change the declaration of some subroutines and structure variables into public type.
I am currently off my workstation. I will submit my modifications for your inspection. Even so, I was suspecting something amiss with my modifications. Then I fell back to use the original ReadByte sub, with it declared public. This also seems to work intermittently.
I will work to see if my own codes have any error. If I can't find one, maybe I will need your help later, again.
Regards,
Liak
I am using the module you posted on the wiki version 4.0.9. However, I must say that with some modification, but not much; there are lots of low level command which I can only guess to understand; except to change the declaration of some subroutines and structure variables into public type.
I am currently off my workstation. I will submit my modifications for your inspection. Even so, I was suspecting something amiss with my modifications. Then I fell back to use the original ReadByte sub, with it declared public. This also seems to work intermittently.
I will work to see if my own codes have any error. If I can't find one, maybe I will need your help later, again.
Regards,
Liak
Dear Steven,
Thanks Steven, your module works perfectly fine. My modifications are also correct. Finally, I found the root of my problem!
Well, I ported to a new PIC from 1320 to 2525. I have wrongly taken the CCP ports are the same with the two chips. So that's why I failed to get the expected output! Took me a day to trace this!
Thanks again. As I always say, the expert (Steven) is always right!
Now I hope the transfer rate is fast enough. Thanks
Regards,
Liak
Thanks Steven, your module works perfectly fine. My modifications are also correct. Finally, I found the root of my problem!
Well, I ported to a new PIC from 1320 to 2525. I have wrongly taken the CCP ports are the same with the two chips. So that's why I failed to get the expected output! Took me a day to trace this!
Thanks again. As I always say, the expert (Steven) is always right!
Now I hope the transfer rate is fast enough. Thanks
Regards,
Liak