Skip to content

SD card initialization fails after SD power down/new init sequence [imported] #14

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

Closed
agdl opened this issue Jul 12, 2016 · 2 comments
Closed
Assignees

Comments

@agdl
Copy link
Member

agdl commented Jul 12, 2016

From @cmaglie on November 15, 2012 19:5

This is Issue 1103 moved from a Google Code project.
Added by 2012-11-07T18:50:46.000Z by [email protected].
Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Defect, Priority-Medium

Original description

What steps will reproduce the problem?

  1. Init SD card
  2. Turn SD card off (by cutting power to SD card, but also to all other SD input pins)
  3. Turn SD card on
  4. Initialize SD card again

What is the expected output? What do you see instead?

The expected output would be to have the SD card re-initialize itself. Instead, the second initialization fails.

I have tracked the failure cause to SDFile.openRoot method that return failure if the root had been already opened.

What version of the Arduino software are you using? On what operating
system? Which Arduino board are you using?

Arduino IDE 1.0.1
Mac OS X
Custom board

Please provide any additional information below.

A fix can be implemented, for example by calling a method that resets the state of the SDClass object in the initialization routine, making sure we start from a blank state.

I am willing to implement the fix, but just want to make sure I implement it the way people would like it.

Copied from original issue: arduino/Arduino#1103

@SodaqMoja
Copy link

This is probably related to PR #37
The caller can first call the end() function before doing init() again.

@cmaglie
Copy link
Contributor

cmaglie commented Nov 14, 2017

Fixed by #37 and #38

@cmaglie cmaglie closed this as completed Nov 14, 2017
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

3 participants