Skip to content

Conversation

earlephilhower
Copy link
Collaborator

Replace the default SPI_FULL/HALF/QUARTER_SPEEDs with ESP8266
appropriate ones taken from the original SD library that @igrr modified.

Fixes #6019

@luc-github , can you try your unmodified code out on this PR and see if it works with no changes from 2.5.0? My setup always seemed to work, so I'm unable to reproduce the failure you had, but it looks pretty straightforward.

Replace the default SPI_FULL/HALF/QUARTER_SPEEDs with ESP8266
appropriate ones taken from the original SD library that @igrr modified.

Fixes esp8266#6019
@luc-github
Copy link
Contributor

Same result

#define SPI_FULL_SPEED       SD_SCK_HZ(80000000)
#define SPI_HALF_SPEED       SD_SCK_HZ(40000000)
#define SPI_QUARTER_SPEED    SD_SCK_HZ(20000000)

have one 0 in excess

#define SPI_FULL_SPEED       SD_SCK_HZ(8000000)
#define SPI_HALF_SPEED       SD_SCK_HZ(4000000)
#define SPI_QUARTER_SPEED    SD_SCK_HZ(2000000)

works for me

as previouly was :

uint32_t const SPI_FULL_SPEED = 8000000;
uint32_t const SPI_HALF_SPEED = 4000000;
uint32_t const SPI_QUARTER_SPEED = 2000000;

@earlephilhower
Copy link
Collaborator Author

Well, that was silly of me. Fixed the scale by 10 issue in the lib.

@earlephilhower earlephilhower merged commit feb3988 into esp8266:master Apr 29, 2019
@earlephilhower earlephilhower deleted the spisdfat branch April 29, 2019 19:39
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

Successfully merging this pull request may close these issues.

Initializing SD card...initialization failed! with GIT but ok with 2.5
2 participants