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

disk_access_spi_sdhc: Missing stop/end bit #33479

Closed
richardbarlow opened this issue Mar 18, 2021 · 0 comments · Fixed by #33480
Closed

disk_access_spi_sdhc: Missing stop/end bit #33479

richardbarlow opened this issue Mar 18, 2021 · 0 comments · Fixed by #33480
Labels
area: Disk Access area: Drivers bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@richardbarlow
Copy link
Contributor

Describe the bug
The SD Card Physical Layer specification states in Table 7-1 (in section 7.3.1.1) that the LSB of the 48 bit command must be set to 1 to act as an 'end bit'. Zephyr currently does not set the LSB to 1 and this deviation from the standard prevents the implementation as it is from functioning with a Swissbit SFSD8192N3BM1TO-I-GE-2B1-STD (8GB microSD). Simply setting the LSB of the CRC byte to 1 in sdhc_spi_tx_cmd fixes the issue and Zephyr can then communicate with the card.

I will create a pull-request with the necessary change.

I suspect that this issue is the root cause of #29946 and #27841.

Environment (please complete the following information):

  • OS: Fedora 32
  • Toolchain: gcc-arm-none-eabi-9-2019-q4-major
  • Commit: v2.4.99-ncs1 (4ce908) from Nordic's Zephyr fork at https:/nrfconnect/sdk-zephyr
@richardbarlow richardbarlow added the bug The issue is a bug, or the PR is fixing a bug label Mar 18, 2021
richardbarlow pushed a commit to richardbarlow/zephyr that referenced this issue Mar 18, 2021
The SD Card Physical Layer specification states in Table 7-1
(in section 7.3.1.1) that the LSB of the 48 bit command must
be set to 1 to act as an 'end bit'.

Fixes zephyrproject-rtos#33479

Signed-off-by: Rich Barlow <[email protected]>
MaureenHelm pushed a commit that referenced this issue Mar 19, 2021
The SD Card Physical Layer specification states in Table 7-1
(in section 7.3.1.1) that the LSB of the 48 bit command must
be set to 1 to act as an 'end bit'.

Fixes #33479

Signed-off-by: Rich Barlow <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Disk Access area: Drivers bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants