|
RE: SD Controller and plb-wb bridge
by bhupesh.suitcasetv on Nov 11, 2009 |
bhupesh.suitcasetv
Posts: 27 Joined: Apr 15, 2009 Last seen: Nov 22, 2013 |
||
|
Hi,
the issue of cmd55 & cmd41 is resolved... i am first sending cmd55& acmd41 with argument 0 and then i receive 00ff8000 in response... again i send cmd55 & acmd41 with argument equals to 00ff8000 and i get response as 00ff8000.. in these steps i get no errors and my responses are error interrupt status = 00000000 normal interrupt status = 00000001 card status = 00006000 command response = 00ff8000 but for cmd2 and cmd 3 i get response as below error interrupt status = 00000001 normal interrupt status = 00008000 card status = 00003000 command response = 00ff8000 one intresting thing i have observed is that when i run the initialization code step by step i get error response for acmd41..but if i put break point before cmd2 i get error status.... any input on how to get rid of cmd 2 & cmd 3 errors.??? Thanks, |
|||
|
RE: SD Controller and plb-wb bridge
by tac2 on Nov 11, 2009 |
tac2
Posts: 27 Joined: Sep 23, 2008 Last seen: Feb 3, 2025 |
||
|
Are u setting CMD_SET_REG [1:0] to "01" when sending CMD 2? Because its a big response.
I think there is something in the SD-specification saying the init sequence ahve a time-out on 1 second so using breakpoint might screw things up
Hi,...............
but for cmd2 and cmd 3 i get response as below error interrupt status = 00000001 normal interrupt status = 00008000 card status = 00003000 command response = 00ff8000 one intresting thing i have observed is that when i run the initialization code step by step i get error response for acmd41..but if i put break point before cmd2 i get error status.... any input on how to get rid of cmd 2 & cmd 3 errors.??? Thanks, |
|||
|
RE: SD Controller and plb-wb bridge
by bhupesh.suitcasetv on Nov 12, 2009 |
bhupesh.suitcasetv
Posts: 27 Joined: Apr 15, 2009 Last seen: Nov 22, 2013 |
||
|
the timeout of 1 sec is till we send ACMD41 after that the specification does not say any time linit to send cmd2 & cmd3....i have set the response size to 136-bit for cmd2....
|
|||
|
RE: SD Controller and plb-wb bridge
by bhupesh.suitcasetv on Nov 12, 2009 |
bhupesh.suitcasetv
Posts: 27 Joined: Apr 15, 2009 Last seen: Nov 22, 2013 |
||
|
i am giving up for some time....i think i have spend enough time with this code right from simulation to synthesis to hardware test....i am angry and confused....don't know how to make it work...good thing is that my project manager in not angry with me..:)...i think there has to be some issue with the controller code....may be i might have made come changes unknowingly....i will try to check that and see if i can get any sucess....thanks to who have helped me...
|
|||
|
RE: SD Controller and plb-wb bridge
by tac2 on Nov 12, 2009 |
tac2
Posts: 27 Joined: Sep 23, 2008 Last seen: Feb 3, 2025 |
||
|
Yes i remeber it was a bit frustrating, the SD-card just stop responding if you make some mistake in the initial sequence...
Btw are you sending CMD55-ACMD41 until busy bit (bit 31) of the reply is set to 1? The replays should be 80FF8000 when its ready for CMD2-CMD3... |
|||
|
RE: SD Controller and plb-wb bridge
by tac2 on Nov 12, 2009 |
tac2
Posts: 27 Joined: Sep 23, 2008 Last seen: Feb 3, 2025 |
||
|
Yes i remeber it was a bit frustrating, the SD-card just stop responding if you make some mistake in the initial sequence...
Btw are you sending CMD55-ACMD41 until busy bit (bit 31) of the reply is set to 1? The replays should be 80FF8000 when its ready for CMD2-CMD3... |
|||
|
RE: SD Controller and plb-wb bridge
by bhupesh.suitcasetv on Nov 13, 2009 |
bhupesh.suitcasetv
Posts: 27 Joined: Apr 15, 2009 Last seen: Nov 22, 2013 |
||
|
i haven't set cmd55 & acmd41 in any loop....but i am sending CMD55 & ACMD41 with argument 0 then(response is 00ff8000 with status register value 00006000) again i send cmd55 and acmd41(argument 00ff8000) i get the same response which i got earlier....as cammand inhibit is showing 0 so i am not repeating the cmd55 & acmd41....should i try some thing else?
|
|||
|
RE: SD Controller and plb-wb bridge
by tac2 on Nov 13, 2009 |
tac2
Posts: 27 Joined: Sep 23, 2008 Last seen: Feb 3, 2025 |
||
|
i haven't set cmd55 & acmd41 in any loop....but i am sending CMD55 & ACMD41 with argument 0 then(response is 00ff8000 with status register value 00006000) again i send cmd55 and acmd41(argument 00ff8000) i get the same response which i got earlier....as cammand inhibit is showing 0 so i am not repeating the cmd55 & acmd41....should i try some thing else?
cmd + acmd41 should be sent in a loop continues until the response messages contain a '1' in bit [31]. |
|||
|
RE: SD Controller and plb-wb bridge
by bhupesh.suitcasetv on Nov 16, 2009 |
bhupesh.suitcasetv
Posts: 27 Joined: Apr 15, 2009 Last seen: Nov 22, 2013 |
||
|
Thanks Tac,
Now the card got initialized....next step is to read/write from the SD card, any thing which needs to the taken care...??? |
|||
|
RE: SD Controller and plb-wb bridge
by tac2 on Nov 16, 2009 |
tac2
Posts: 27 Joined: Sep 23, 2008 Last seen: Feb 3, 2025 |
||
|
No, should t be, just follow the main.c.
Remember block size must be 512 bytes, and bus width ( CMD55 followed by ACMD 6) to the same as u set in the confige when you synthesized |
|||
|
RE: SD Controller and plb-wb bridge
by bhupesh.suitcasetv on Nov 19, 2009 |
bhupesh.suitcasetv
Posts: 27 Joined: Apr 15, 2009 Last seen: Nov 22, 2013 |
||
|
No, should t be, just follow the main.c.
Remember block size must be 512 bytes, and bus width ( CMD55 followed by ACMD 6) to the same as u set in the confige when you synthesized the response of ACMD6 is 0x00000920 which i think is good. response of BD status is 0x00001010 which i think says u can send 3 receive and transmit descriptors how do i write into BD_TX register as it is 64-bit long. I am using IOWR function of ALTERA NIOS API. any idea how to get rid of this problem? Thanks, Bhupesh |
|||
|
RE: SD Controller and plb-wb bridge
by bhupesh.suitcasetv on Nov 19, 2009 |
bhupesh.suitcasetv
Posts: 27 Joined: Apr 15, 2009 Last seen: Nov 22, 2013 |
||
|
how do i make sure that BD_TX register value are written correctly?
i am first writing 0x03fff3d4 in BD_TX then i am writing 0x00000200 when i read Bd_TX register after first write and second write i get 0x00001010.....how do i make sure that BD_TX regsiter hold right value.....when i set the BD_TX to write data into SD card...the program goes into indefinate loop of while ( ((IORD(SD_TOP_0_BASE,BD_ISR) &1) !=1) ){ }...any ideas??? |
|||
|
RE: SD Controller and plb-wb bridge
by tac2 on Nov 19, 2009 |
tac2
Posts: 27 Joined: Sep 23, 2008 Last seen: Feb 3, 2025 |
||
|
how do i write into BD_TX register as it is 64-bit long. I am using IOWR function of ALTERA NIOS API. any idea how to get rid of this problem? Thanks, Bhupesh
how do i make sure that BD_TX register value are written correctly?
i am first writing 0x03fff3d4 in BD_TX then i am writing 0x00000200 when i read Bd_TX register after first write and second write i get 0x00001010.....how do i make sure that BD_TX regsiter hold right value.....when i set the BD_TX to write data into SD card...the program goes into indefinate loop of while ( ((IORD(SD_TOP_0_BASE,BD_ISR) &1) !=1) ){ }...any ideas??? You cant readback those register. Probably the transfer is completed (therefore it returns to 0x1010. But something probably went wrong because bit 1 never get set, print put the response of BD_ISR reg. |
|||
|
RE: SD Controller and plb-wb bridge
by bhupesh.suitcasetv on Nov 20, 2009 |
bhupesh.suitcasetv
Posts: 27 Joined: Apr 15, 2009 Last seen: Nov 22, 2013 |
||
|
Probably the transfer is completed (therefore it returns to 0x1010. But something probably went wrong because bit 1 never get set, print put the response of BD_ISR reg.
i get 0x00001010 for BD_TX register not for BD_ISR...the BD_ISR gives 0x0000 value which i think says transfer is in progress.... |
|||
|
RE: SD Controller and plb-wb bridge
by bhupesh.suitcasetv on Nov 20, 2009 |
bhupesh.suitcasetv
Posts: 27 Joined: Apr 15, 2009 Last seen: Nov 22, 2013 |
||
|
has any one verified this code in cyclone FPGA?
|
|||




