Skip to content

STM32SD end() functionality to support SD card/library reset during operation #71

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
BrynMorgan1 opened this issue Apr 23, 2024 · 1 comment · Fixed by #79
Closed

STM32SD end() functionality to support SD card/library reset during operation #71

BrynMorgan1 opened this issue Apr 23, 2024 · 1 comment · Fixed by #79
Assignees
Labels
Milestone

Comments

@BrynMorgan1
Copy link

BrynMorgan1 commented Apr 23, 2024

The current STM32SD library does not have an end() or similar function to support stopping and deinitialising the library and SDIO peripheral.

Having an end() function would allow for:

  • SD card reinsertion without resetting the MCU
  • SDIO peripheral reset in rare case of SD card hang/fault

The end() function should perform the following at least:

  • Deinitialise the SDIO peripheral of the MCU
  • Reset the STM32SD library to an uninitialised state, such that begin() may be called again successfully
  • Allow the SDIO GPIO pins to be configured as normal GPIO pins (eg. configured as analog input to save power in low-power state)

The Arduino SD library has recently implemented support for end(), which looks like this:
https://github.com/arduino-libraries/SD/blob/a3866205cf9af4eea3e10dcdc5ac2c713f293337/src/SD.cpp#L369-L372
image

Kind regards,
Bryn

@BrynMorgan1 BrynMorgan1 added the enhancement New feature or request label Apr 23, 2024
@fpistm fpistm self-assigned this Jun 20, 2024
@fpistm fpistm added this to the 1.3.3 milestone Sep 5, 2024
@fpistm
Copy link
Member

fpistm commented Sep 24, 2024

For ref: arduino-libraries/SD#37

fpistm added a commit to fpistm/STM32SD that referenced this issue Sep 27, 2024
Fixes stm32duino#71

Signed-off-by: Frederic Pillon <[email protected]>
fpistm added a commit to fpistm/STM32SD that referenced this issue Sep 27, 2024
Fixes stm32duino#71

Signed-off-by: Frederic Pillon <[email protected]>
fpistm added a commit to fpistm/STM32SD that referenced this issue Sep 27, 2024
Fixes stm32duino#71

Signed-off-by: Frederic Pillon <[email protected]>
@github-project-automation github-project-automation bot moved this from To do to Done in STM32duino libraries Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging a pull request may close this issue.

2 participants