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

ESP32 SDCard reinitialize issue #894

Closed
alberk8 opened this issue Nov 22, 2021 · 1 comment · Fixed by nanoframework/nf-interpreter#2158
Closed

ESP32 SDCard reinitialize issue #894

alberk8 opened this issue Nov 22, 2021 · 1 comment · Fixed by nanoframework/nf-interpreter#2158

Comments

@alberk8
Copy link

alberk8 commented Nov 22, 2021

Details about Problem

When SDCard is disposed subsequent reinitialization will fail.

Target:
ESP32 WROVER

Firmware image version:
1.7.1-preview.1125

Worked before? If so, with which nanoFramework image version:
Not sure.

Description

An exception is thrown when subsequent attempt to reinitialized the SDCard class.

Detailed repro steps so we can see the same problem

 var mycard = new SDCard(new SDCard.SDCardMmcParameters { dataWidth = SDCard.SDDataWidth._4_bit });
 mycard.Mount();
 mycard.Unmount();
 mycard.Dispose();

// fail here
var mycard1 = new SDCard(new SDCard.SDCardMmcParameters { dataWidth = SDCard.SDDataWidth._4_bit });
 mycard1.Mount();
 mycard1.Unmount();
 mycard1.Dispose();

Other suggested things

Exception Thrown

++++ Exception System.Exception - CLR_E_PIN_UNAVAILABLE (1) ++++
++++ Message: 
++++ nanoFramework.System.IO.FileSystem.SDCard::InitNative [IP: 0000] ++++
++++ nanoFramework.System.IO.FileSystem.SDCard::.ctor [IP: 0025] ++++
++++ nanoFrameworkSDCard.Program::Main [IP: 0029] ++++
Exception thrown: 'System.Exception' in System.IO.FileSystem.dll
An unhandled exception of type 'System.Exception' occurred in System.IO.FileSystem.dll

Expected behaviour

SDCard class should not throw exception if it was previously disposed.

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

Successfully merging a pull request may close this issue.

3 participants