Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

netduino throws a CLR_E_VOLUME_NOT_FOUND exception when mounting an SD card


  • Please log in to reply
19 replies to this topic

#1 Fabien Royer

Fabien Royer

    Advanced Member

  • Members
  • PipPipPip
  • 406 posts
  • LocationRedmond, WA

Posted 19 December 2010 - 02:11 AM





Hi,


I'm experiencing a CLR_E_VOLUME_NOT_FOUND error using a plain netduino and this SD card reader: http://futurlec.com/Mini_SC.shtml with a 1GB SD card using the SD card sample from the forum http://forums.netdui...sd-card-sample/



I know that the card and the reader are OK because I tested them successfully using an Arduino and SDFatlib: http://code.google.com/p/sdfatlib/.


The netduino -> SD reader connections are:


netduino pin 13 -> SCK
netduino pin 12 -> MISO
netduino pin 11 -> MOSI
netduino pin 10 -> Slave/Chip Select


The netduino firmware is up to date:



HalSystemInfo.halVersion: 4.1.2821.0
HalSystemInfo.halVendorInfo: Netduino (v4.1.1.0 a3) by Secret Labs LLC
HalSystemInfo.oemCode: 34
HalSystemInfo.modelCode: 177
HalSystemInfo.skuCode: 4096
HalSystemInfo.moduleSerialNumber: 00000000000000000000000000000000
HalSystemInfo.systemSerialNumber: 0000000000000000
ClrInfo.clrVersion: 4.1.2821.0
ClrInfo.clrVendorInfo: Netduino (v4.1.1.0 a3) by Secret Labs LLC
ClrInfo.targetFrameworkVersion: 4.1.2821.0
SolutionReleaseInfo.solutionVersion: 4.1.1.0
SolutionReleaseInfo.solutionVendorInfo: Netduino (v4.1.1.0 a3) by Secret Labs LLC
SoftwareVersion.BuildDate: Nov 24 2010
SoftwareVersion.CompilerVersion: 410561


<snipped the rest>

Any thoughts?

Cheers,
-Fabien.


#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 19 December 2010 - 04:15 AM

Hi Fabien, Welcome to the Netduino community! I think there may be an issue in the alpha 3 firmware with SD card support... I've put in a support request to check this out...if something broke between a2 and a3, we'll fix it in the a4 firmware that's coming out in the next two weeks. Chris P.S. I can re-post the alpha 2 firmware if you want a copy while we investigate.

#3 Fabien Royer

Fabien Royer

    Advanced Member

  • Members
  • PipPipPip
  • 406 posts
  • LocationRedmond, WA

Posted 19 December 2010 - 04:58 AM

Hi Fabien,

Welcome to the Netduino community!

I think there may be an issue in the alpha 3 firmware with SD card support... I've put in a support request to check this out...if something broke between a2 and a3, we'll fix it in the a4 firmware that's coming out in the next two weeks.

Chris

P.S. I can re-post the alpha 2 firmware if you want a copy while we investigate.


Hi Chris,

Thanks for the reply. Sure, if you don't mind re-posting alpha 2, I'll be glad to give it a shot and report my findings on this thread.

Cheers,
-Fabien.

#4 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 19 December 2010 - 05:22 AM

Thanks for the reply. Sure, if you don't mind re-posting alpha 2, I'll be glad to give it a shot and report my findings on this thread.


Thanks, Fabien. Here you go: http://forums.netdui...ha-2/#entry3226

Chris

#5 Fabien Royer

Fabien Royer

    Advanced Member

  • Members
  • PipPipPip
  • 406 posts
  • LocationRedmond, WA

Posted 19 December 2010 - 06:11 AM

Thanks, Fabien. Here you go: http://forums.netdui...ha-2/#entry3226

Chris


Hey Chris,


Ok, everything works with 4.1.1.0 alpha 2 now.
There's definitely a regression in the SD card code in alpha 3.

Thanks a lot! :)

Cheers,
-Fabien.

#6 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 19 December 2010 - 06:17 AM

Ok, everything works with 4.1.1.0 alpha 2 now.
There's definitely a regression in the SD card code in alpha 3.


Thanks for testing that. Glad it's working with alpha 2!

We'll make sure the SD feature is working again in alpha 4.

Chris

#7 Fabien Royer

Fabien Royer

    Advanced Member

  • Members
  • PipPipPip
  • 406 posts
  • LocationRedmond, WA

Posted 19 December 2010 - 06:25 AM

Out of curiosity, what are the current default SPI config settings used in the mount() call? Have you considered an alternate version of mount() which would let the user specify the SPI configuration settings as well as the slave/chip select pin? Cheers, -Fabien.

#8 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 19 December 2010 - 06:28 AM

Out of curiosity, what are the current default SPI config settings used in the mount() call?
Have you considered an alternate version of mount() which would let the user specify the SPI configuration settings as well as the slave/chip select pin?


I believe the default is 10KBPS or 15KBPS using the default SD SPI settings. We haven't finalized the MountSD(...) function yet; what other specific options would you be interested in having exposed?

Chris

#9 Fabien Royer

Fabien Royer

    Advanced Member

  • Members
  • PipPipPip
  • 406 posts
  • LocationRedmond, WA

Posted 19 December 2010 - 07:02 AM

I believe the default is 10KBPS or 15KBPS using the default SD SPI settings. We haven't finalized the MountSD(...) function yet; what other specific options would you be interested in having exposed?

Chris


It may be worthwhile for the mount() call to accept a specialized EventHandler delegate parameter for notifications such as when the SD card is pulled out of the reader.

-Fabien.

#10 Fred

Fred

    Advanced Member

  • Members
  • PipPipPip
  • 302 posts
  • LocationUK

Posted 19 December 2010 - 11:19 AM

Ok, everything works with 4.1.1.0 alpha 2 now.
There's definitely a regression in the SD card code in alpha 3.

I can confirm that too. I wish this post had been here last night! I spend an hour or two trying to get my SD breakout board working and assumed that either I'd got something wrong or that the board wasn't compatible. Firmware Alpha 2 is working fine, but Alpha 3 gives CLR_E_VOLUME_NOT_FOUND.


Just to help anyone else that's trying to connect an SD card - I used the SparkFun microSD breakout board. There's no circuitry on the board - it just gives you easier access to the SD connectors. All the Arduino-specific shield stuff I found has some extra circuitry. I thought I may have bought the wrong component, but I now assume this is just a 5V/3.3V level convertor. To get it working with the Netduino all you need is to do is flash firmware 4.1.1 alpha 2, use sample code as Chris posted earlier and connect the following up:

CD - not needed
DO - Netduino D12 (SPI MISO)
GND - Netduino GND
SCK - Netduino D13 (SPI SPCK)
VCC - Netduino 3V3
DI - Netduino D11 (SPI MOSI)
CS - Netduino D10

#11 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 19 December 2010 - 03:47 PM

It may be worthwhile for the mount() call to accept a specialized EventHandler delegate parameter for notifications such as when the SD card is pulled out of the reader.


That's a really good idea. There are a set of RemovableMedia "insert" and "eject" events built into .NET MF...let me see if we can get those wired up.

Chris

#12 Fabien Royer

Fabien Royer

    Advanced Member

  • Members
  • PipPipPip
  • 406 posts
  • LocationRedmond, WA

Posted 20 December 2010 - 05:48 AM

Hi Chris,

I wanted to let you know that I have discovered an issue with the 4.1.1.0 alpha 2 firmware where GPIO PIN 2 becomes 'unstable' / 'unresponsive' after reading data from a file on an SD card. The issue is similar to the one described in this thread http://forums.netdui...ith-gpio-lines/.
I do not believe that this is specifically related to directory access functions though.

Please let me know if you would like more details on repro steps.

Cheers,
-Fabien.

#13 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 20 December 2010 - 05:51 AM

Please let me know if you would like more details on repro steps.

Yes, absolutely. Please. Is it digital pin 2 which exhibits the issue?

If this issue exists with the regular Netduino using the SPI pins on D11-D13 and also the Netduino Plus using the internal SPI pins...that may really help us narrow down what is going on.

Chris

#14 Fabien Royer

Fabien Royer

    Advanced Member

  • Members
  • PipPipPip
  • 406 posts
  • LocationRedmond, WA

Posted 20 December 2010 - 08:02 AM

Yes: this is a regular netduino and it is indeed digital pin 2 which is having the issue and I'm using SPI with D11-D13 + D10 for chip select. I'll provide you with more details tomorrow along with a link to source code and a video showing the issue. Cheers, -Fabien.

#15 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 20 December 2010 - 08:22 AM

Yes: this is a regular netduino and it is indeed digital pin 2 which is having the issue and I'm using SPI with D11-D13 + D10 for chip select.
I'll provide you with more details tomorrow along with a link to source code and a video showing the issue.


That would be wonderful. Thanks Fabien!

Chris

#16 Fabien Royer

Fabien Royer

    Advanced Member

  • Members
  • PipPipPip
  • 406 posts
  • LocationRedmond, WA

Posted 20 December 2010 - 07:10 PM

Hi Chris,

About the project in a nutshell:
  • I'm driving an 8x8 LED matrix, relying on persistence of vision (see my blog http://bit.ly/gXOngf for more in-depth details)
  • The rows in the LED matrix are controlled using digital pins 0-7
  • The columns in the LED matrix are controlled using a shift register driven with SPI (digital pins 11-13) and digital pin 8 (latch)
  • The SD card is also driven with SPI (digital pins 11-13) and digital pin 10 (chip select)

You can find the code for the project here: http://bit.ly/e8rfaD.
You will also find 2 short videos demonstrating the issue with digital pin 2 when the SD card is accessed (the 3rd row in the matrix stays off) vs. when it isn't (the 3rd row works fine).

In the project, uncomment line 30 to make the code access the SD card:
//var bitmap = C64CharSet.StringToBitmap(SDRead("display.txt"));
and comment out line 33:
var bitmap = C64CharSet.StringToBitmap("No SD card: PIN D2 works OK...");


Please let me know if you have any questions.

Cheers,
-Fabien.

PS: I have confirmed that initializing the pins controlling the rows in the matrix (digital pin 0-7) after successfully mounting/reading from the SD card has no effect on digital pin 2 which remains unresponsive. However, if the mount() call fails, digital pin 2 works fine.

#17 Fabien Royer

Fabien Royer

    Advanced Member

  • Members
  • PipPipPip
  • 406 posts
  • LocationRedmond, WA

Posted 20 December 2010 - 07:30 PM

Chris, One thing worth mentioning: even though I'm on the alpha 2 firmware, I'm using the SecretLabs.NETMF.IO.dll assembly provided by alpha 3 here: http://forums.netdui...&attach_id=359. If there's a different assembly for alpha 2 that I should be using, can you please make it available? Thanks, -Fabien.

#18 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 20 December 2010 - 09:16 PM

Chris,
One thing worth mentioning: even though I'm on the alpha 2 firmware, I'm using the SecretLabs.NETMF.IO.dll assembly provided by alpha 3 here: http://forums.netdui...&attach_id=359.

If there's a different assembly for alpha 2 that I should be using, can you please make it available?


There were no changes in the assembly between alpha releases...just in the firmware.

Digital pin 2 is "pin 0" on the Netduino... We're digging into both the SD code and the SPI code to see if perhaps a pin value isn't being initialized, and is defaulting to "0." That would cause this sort of issue. Your repro case is really helpful.

Chris

#19 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 01 January 2011 - 04:04 AM

Quick follow-up... The SD feature is back and working properly in the v4.1.1 alpha 4 firmware (coming this weekend)... This includes a fix of the "D2" blinky issue. Chris

#20 Fabien Royer

Fabien Royer

    Advanced Member

  • Members
  • PipPipPip
  • 406 posts
  • LocationRedmond, WA

Posted 03 January 2011 - 08:01 PM

Thanks Chris. I tested it successfully over the weekend :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.