GreatGBL Posted February 11, 2017 Share Posted February 11, 2017 Hello, I want to ask how could I use Basys3 to save data into SD card? I have to use SPI protocol? Thanks Link to comment Share on other sites More sharing options...
D@n Posted February 11, 2017 Share Posted February 11, 2017 @GreatGBL, As I recall, the Basys3 doesn't have any SD card interface. Do you have the PModSD? I am aware of three SD-card controllers. There's my own controller, built for the SD card on a XuLA2-LX25 board, that works in SPI mode only. There's also Xess.com's VHDL controller for the same piece of hardware. Finally, there's an OpenCores SDcard controller that uses the full SDIO mode. I would imagine Xilinx has produced a controller as well, but I'm not familiar with it. None of these controllers handles the file-system. So, you can either write directly to the SD-card without using filesystem (or boot-sector, if you so choose), or ... do some extra work to handle that. Dan Link to comment Share on other sites More sharing options...
GreatGBL Posted February 12, 2017 Author Share Posted February 12, 2017 11 hours ago, D@n said: @GreatGBL, As I recall, the Basys3 doesn't have any SD card interface. Do you have the PModSD? I am aware of three SD-card controllers. There's my own controller, built for the SD card on a XuLA2-LX25 board, that works in SPI mode only. There's also Xess.com's VHDL controller for the same piece of hardware. Finally, there's an OpenCores SDcard controller that uses the full SDIO mode. I would imagine Xilinx has produced a controller as well, but I'm not familiar with it. None of these controllers handles the file-system. So, you can either write directly to the SD-card without using filesystem (or boot-sector, if you so choose), or ... do some extra work to handle that. Dan Hello, I want to ask it is available to use an SDcard module which works on Arduino. I can use SPI protocol to connect the SDcard module to Basys3. Using SD card protocol to transmit the data by bits, thanks. Kind regards, GreatGBL Link to comment Share on other sites More sharing options...
D@n Posted February 13, 2017 Share Posted February 13, 2017 @GreatGBL, I'm not sure I can help you with the Arduino interface--I've never used an Arduino, despite having the IDE on my desktop. What I can offer, though, is that here's a generic SPI interface controller on OpenCores. You may find that useful. Perhaps someone else has done this sort of thing, Dan Link to comment Share on other sites More sharing options...
jpeyron Posted February 13, 2017 Share Posted February 13, 2017 Hi GreatGBL, @D@n's generic SPI controller should work for communication between the basys 3 and the SDcard module if the SDcard module uses standard SPI communications. If there is a library already written for this SDcard module then with some work you should be able to convert it to work in SDK. Here is a link to our PmodSD IP on github which works with a soft core processor(Microblaze) and the PmodSD which you can find here. cheers, Jon Link to comment Share on other sites More sharing options...
GreatGBL Posted February 16, 2017 Author Share Posted February 16, 2017 On 2017/2/13 at 9:34 PM, jpeyron said: Hi GreatGBL, @D@n's generic SPI controller should work for communication between the basys 3 and the SDcard module if the SDcard module uses standard SPI communications. If there is a library already written for this SDcard module then with some work you should be able to convert it to work in SDK. Here is a link to our PmodSD IP on github which works with a soft core processor(Microblaze) and the PmodSD which you can find here. cheers, Jon Well, Thanks you very much, but the sd card in SPI module is slow, approximately 2Mbps, but my ADC has 20Mbps speed, it is not enough so a large amount will lose.. Kind Regards, GreatGBL Link to comment Share on other sites More sharing options...
D@n Posted February 17, 2017 Share Posted February 17, 2017 @GreatGBL, 20Mbps? Is that the rate you wish to store? Okay ... how much information do you wish to store at this rate? I mean, I have experience getting an SD card to run at 1MB/s, or around 8 Mbps, but 20Mbps? You may need to work your design around that constraint. Hence my question, how much data do you need to store at that rate? Dan Link to comment Share on other sites More sharing options...
GreatGBL Posted February 17, 2017 Author Share Posted February 17, 2017 4 minutes ago, D@n said: @GreatGBL, 20Mbps? Is that the rate you wish to store? Okay ... how much information do you wish to store at this rate? I mean, I have experience getting an SD card to run at 1MB/s, or around 8 Mbps, but 20Mbps? You may need to work your design around that constraint. Hence my question, how much data do you need to store at that rate? Dan Yes, 20Mbps, that is the clock frequency from my ADC, every rising edge it sent 1bit to Basys3. So at least I need the 20Mbps speed. My project used 9 microphones, the sample rate of ADC is 40Khz and it has 12bits resolution. If I want to run 3s, there are 9*12*3*40*1000=12,960,000 bits = 12.35Mb in the Ram So I think Sd card does not have 20Mps speed in SPI mode.. My new method is Using Zedboard replace the Basys3 because Zedboard has a 512MB DDR3 RAM, so I want to try to save the data into this RAM, then use UART send the bits out to PC. I think the saving speed of RAM is absolutely over 20Mbps... Thanks for your help Kind Regards, GreatGBL Link to comment Share on other sites More sharing options...
D@n Posted February 17, 2017 Share Posted February 17, 2017 @GreatGBL, 9 microphones at 40 kHz and 12-bit data samples should be 4.3Mbps, not 20. Not sure where you got the 20Mbps number from. Reading over the SD card specification, the 2016 version (v5.0) suggests there might exist cards that can operate at 10MB/s. While they may exist, I have no experience with them. As for the Zedboard, you are two steps ahead of me then. I was going to recommend that you use a board with some amount of RAM on it, if you had to ingest a large amount of data at a high speed. While I am not as familiar with the ZedBoard, its specs suggest it should meet your purpose quite nicely. Dan Link to comment Share on other sites More sharing options...
GreatGBL Posted February 17, 2017 Author Share Posted February 17, 2017 6 minutes ago, D@n said: @GreatGBL, 9 microphones at 40 kHz and 12-bit data samples should be 4.3Mbps, not 20. Not sure where you got the 20Mbps number from. Reading over the SD card specification, the 2016 version (v5.0) suggests there might exist cards that can operate at 10MB/s. While they may exist, I have no experience with them. As for the Zedboard, you are two steps ahead of me then. I was going to recommend that you use a board with some amount of RAM on it, if you had to ingest a large amount of data at a high speed. While I am not as familiar with the ZedBoard, its specs suggest it should meet your purpose quite nicely. Dan Alright, 20MHz is the clock frequency from my ADC in SPI protocol. if it is 4.2Mbps.. Maybe it works on Basys3, I try to use the library Link to comment Share on other sites More sharing options...
Question
GreatGBL
Hello, I want to ask how could I use Basys3 to save data into SD card? I have to use SPI protocol? Thanks
Link to comment
Share on other sites
9 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.