FPGA, SoC, And CPLD Boards And Kits
FPGA Evaluation and Development Kits

DE1 SD-Card access question

Altera_Forum
Honored Contributor II
1,115 Views

Hi, 

 

I have the DE1 dev Board and using it with Quartus 2 10.1 SP1. 

 

So I want to access an SD-Card plugged into the DE1's sd slot without a NIOS architecture, just pure vhdl logic. That is no problem, as I am doing that in some state machine logic then, but it seems there is no input from the wires / connections when driving the card into the SPI mode. I read just 0 from SD_DAT0, regardless which command I send either (CMD0 in that case would init SPI mode as descripted on the papers.) 

 

I managed to add all the related pins for the sd-card from the "DE1_SD_Card_Audio" example and well checked it too with the board layout pdf file if it is correct. nCEO pin is set to regular I/O. 

 

The SD-Cards (no HC) are at different size, one is 64MB and the other 2GB. 

 

 

Here is an simplified version of the code I created in vhdl so far using some sd papers / tutorials. 

 

1. After power on hold the card 1ms idle. 

2. Then CS (DAT3) and DI (CMD) = 1, clock SD_CLK for 74 times. 

3. CS (DAT3) = 0 & Sending CMD0 in serial bit stream aligned to the clock. 

4. DI (CMD) = 1 & Wait 8 bytes long (so far I tried from 0-10) 8 * 8 cycles for the response while clock SD_CLK. 

5. Read the possible response from negated SD_DAT0. 

 

But response is always 0. 

 

Is there any known issue for the DE1 SD-Card slot or pins/wires assignment notices to consider? I debugged and simulated already, the pins are successfully connected to the outlets by the assembler. 

 

I someone wants to investigate my vhdl code files, I will post him/her via p.m. 

 

Thank you.
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
244 Views

Hi all, 

What will be the step by step to program this. 

Please help, i try to used the demo program.
0 Kudos
Reply