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

[BUG] SDIO write problem #321

Open
1 task done
maronson22 opened this issue Aug 23, 2023 · 0 comments
Open
1 task done

[BUG] SDIO write problem #321

maronson22 opened this issue Aug 23, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@maronson22
Copy link

Is there an existing core-v-mcu bug for this?

  • I have searched the existing bug issues

Bug Description

The SDIO data transmit sequence appears to have a problem. The active low "start" bit is asserted simultaneously with the rising edge of the SD Clock. Since data is clocked in on that edge by the SD card, this should be asserted on the previous falling edge in order to ensure that it is seen as low.

You can see this in the capture we did on the actual SD signals on a Genesys 2 board. The first data transition (start bit) occurs on a rising clock edge, while all subsequent transitions occur on falling edge. The SD card misses this transition, so sees a CRC error, and doesn't write the data.

Capture

The problem occurs in the file "sdio_txrx_data.sv". Output data is enabled with the signal "s_ddata_oen", which changes on the rising edge of clock. This needs to be asserted one clock earlier, and then registered on the clock's falling edge. We made this change and now have a successful file system running. I can post a pull request if appropriate.

Since the CORE-V MCU has already been taped out, a workaround for the dev board is to add a delay element to the SD Clock signal to ensure the required 3 nsec setup time of data to clock is met (unless of course the chip's propagation delays ensure this)

@maronson22 maronson22 changed the title [BUG] <title>SDIO write problem [BUG] SDIO write problem Aug 23, 2023
@MikeOpenHWGroup MikeOpenHWGroup added the bug Something isn't working label Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants