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

Allow SD card SPI speed to be selected in settings #81

Open
and3rson opened this issue Mar 28, 2024 · 2 comments
Open

Allow SD card SPI speed to be selected in settings #81

and3rson opened this issue Mar 28, 2024 · 2 comments

Comments

@and3rson
Copy link
Owner

and3rson commented Mar 28, 2024

Some cards support speed up to 50 MHz.

I suggest the following choices:

  • 4 MHz
  • 10 MHz
  • 20 MHz (current default)
  • 25 MHz (maximum allowed by SD lib)

Default is 4 MHz. Our default (in sdk) is 20 MHz. My class 10 card works even @ 25 MHz without issues.

@frostmorn
Copy link
Collaborator

frostmorn commented Mar 29, 2024

I've tried worst ever card I ever had, and it supports 20 MHz without problems.
We could try to initialize card at max frequency, and if card is recognized okay(cardType != CARD_UNKNOWN || cardType != CARD_NONE) we could proceed, otherwise
drop to lower values and retry, without notifying user at all.

@frostmorn
Copy link
Collaborator

frostmorn commented Mar 29, 2024

It seems that 25 Mhz chosen here as a Default speed value any SD card should support
Screenshot 2024-03-29 at 01-07-43 SD card - Wikipedia

Some cards support even much more, so init card at 25 Mhz should be okay
But to be sure, we could adjust frequency as I mentioned before

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

No branches or pull requests

2 participants