Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using it as a linux SDCARD in SPI mode. #2

Open
Dolu1990 opened this issue Dec 3, 2019 · 3 comments
Open

Using it as a linux SDCARD in SPI mode. #2

Dolu1990 opened this issue Dec 3, 2019 · 3 comments

Comments

@Dolu1990
Copy link

Dolu1990 commented Dec 3, 2019

Hi,

We are using the sd_device for simulation purpose (verilator) to emulate a SDCARD used by a softcore running linux. (SpinalHDL/SaxonSoc#7)

Got a few issue, had to add some "state exit" logic to unblock the situation durring the weird sequance that the linux SDCARD driver does to unlock/unfreeze sdcard on boot (SpinalHDL@414c935#diff-6903b38ec20622e06f2d9b5083d4f347R327)

Also, had to add support for RESP_R1B (used after MULTIPLE_READ)

Now seem there is some issue with WRITE_MULTIPLE ending.

Do you have some ideas about those issues ?
If you want we can setup a easy to use case reproduction for you to get some waves :)

Anyway, thanks for the project ^^

@danielkucera
Copy link

Hi @Dolu1990 ,
I have the same issue with CMD25 WRITE_MULTIPLE.
Did you manage to get it to work?

@danielkucera
Copy link

I have made a logic capture:
image
you can see the DAT0 is kept low and clock is enabled so the host is waiting for something.
From the spec:

After receiving a block of data and completing the CRC check, the card will begin writing and hold the DAT0 line low if its write buffer is full and unable to accept new data from a new WRITE_BLOCK command.

So the bug is probably somewhere around here?
https://github.com/fusesoc/sd_device/blob/master/rtl/verilog/sd_link.v#L968
Maybe block_write_done is not set?

@Dolu1990
Copy link
Author

Dolu1990 commented May 5, 2024

Hi @danielkucera

Didn't got it to work, but didn't tried enough i guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants