I'm looking into storing data from an ADC system read through an FPGA to an SD card at 3.5 Mbps. I'd prefer not to use a processor. It looks like I could plug the PmodSD into a CMOD A7 (for example). I've found some discussions of directly writing to an SD card on the Digilent Forum, and some links to VHDL to do this; I especially like this code:
D@n says he has been able to write to an SD card at 8 Mbps, so that would be fast enough for me. However, in this discussion:
BenBog says he can't write faster than 1 Mbps. Is this because he is going through a linux driver from the MicroBlaze?
Once the write gets going, the SPI clock used by the SD card is 25 MHz, so I'm wondering what limits the achievable write speed to much less than 25 Mbps? Is it because the write is limited to 512 byte blocks and then you have to set up a new write sequence?
If one writes to an SD card directly with vhdl through SPI you obviously don't generate a file system; I presume if you use a formatted SD card the file formatting gets overwritten. This would be fine, but I'm wondering how/if one can then read this SD card on a computer? Presumably when you plug in such a card the OS will see that the card isn't formatted and won't know what to do with it. Is there some way to still get the data off the card?
Question
PTSmith
Hello,
I'm looking into storing data from an ADC system read through an FPGA to an SD card at 3.5 Mbps. I'd prefer not to use a processor. It looks like I could plug the PmodSD into a CMOD A7 (for example). I've found some discussions of directly writing to an SD card on the Digilent Forum, and some links to VHDL to do this; I especially like this code:
https://github.com/xesscorp/VHDL_Lib/blob/master/SDCard.vhd?_ga=2.101734593.1593613684.1574706372-1261715882.1574452484
In this discussion:
D@n says he has been able to write to an SD card at 8 Mbps, so that would be fast enough for me. However, in this discussion:
BenBog says he can't write faster than 1 Mbps. Is this because he is going through a linux driver from the MicroBlaze?
Once the write gets going, the SPI clock used by the SD card is 25 MHz, so I'm wondering what limits the achievable write speed to much less than 25 Mbps? Is it because the write is limited to 512 byte blocks and then you have to set up a new write sequence?
If one writes to an SD card directly with vhdl through SPI you obviously don't generate a file system; I presume if you use a formatted SD card the file formatting gets overwritten. This would be fine, but I'm wondering how/if one can then read this SD card on a computer? Presumably when you plug in such a card the OS will see that the card isn't formatted and won't know what to do with it. Is there some way to still get the data off the card?
thanks in advance,
Paul Smith
Indiana University Physics
Link to comment
Share on other sites
12 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.