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

Exception on StorageDevice.MountSD in 4.1.1 BETA 1


  • Please log in to reply
4 replies to this topic

#1 Rik P.

Rik P.

    Member

  • Members
  • PipPip
  • 18 posts

Posted 26 March 2011 - 11:13 AM

Hi all Anyone else getting the following exception when attempting to mount their SD card using the new 4.1.1 BETA 1 release? #### Exception System.IO.IOException - CLR_E_VOLUME_NOT_FOUND (1) #### #### Message: #### SecretLabs.NETMF.IO.StorageDevice::SDSPI_Mount [IP: 0000] #### #### SecretLabs.NETMF.IO.StorageDevice::MountSD [IP: 0016] #### #### SecretLabs.NETMF.IO.StorageDevice::MountSD [IP: 0008] #### #### CC1.Program::Test [IP: 000a] #### #### CC1.Program::Main [IP: 006d] #### A first chance exception of type 'System.IO.IOException' occurred in SecretLabs.NETMF.IO.dll

---
Twitter: @rikp


#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 26 March 2011 - 04:22 PM

Hi Rik, Two quick things: 1. The old MountSD function ignored the SPI module, chip select and card detect parameters. They defaulted to "SPI on pins D11/D12/D13, chip select on pin D10, no card detect." Can you verify your MountSD parameters--and post the code and what SD shield/wiring you're using? 2. What brand/model of SD card are you using? Did it work with the previous (v4.1.0.6/v4.1.1 alpha) builds? Chris

#3 Rik P.

Rik P.

    Member

  • Members
  • PipPip
  • 18 posts

Posted 26 March 2011 - 04:32 PM

Hi Rik,

Two quick things:
1. The old MountSD function ignored the SPI module, chip select and card detect parameters. They defaulted to "SPI on pins D11/D12/D13, chip select on pin D10, no card detect." Can you verify your MountSD parameters--and post the code and what SD shield/wiring you're using?
2. What brand/model of SD card are you using? Did it work with the previous (v4.1.0.6/v4.1.1 alpha) builds?

Chris


Hi Chris

I'm using the following line of code to mount the SD card:

StorageDevice.MountSD("SD", SPI.SPI_module.SPI1, Cpu.Pin.GPIO_Pin10)

I'm using this Sparkfun SD BOB and it is wired to the Netduino as follows:

BOB:........NETDUINO:
D0..........D12
GND.........GND
CLK.........D13
VCC.........3V3
DI..........D11
CS..........D10

I'm using a SanDisk 2GB SD Card.

This is actually my first venture in attempting to use an SD card with the Netduino and I'm fairly new to this.

Does this info help?

Thanks,

Rik.

---
Twitter: @rikp


#4 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 26 March 2011 - 04:36 PM

StorageDevice.MountSD("SD", SPI.SPI_module.SPI1, Cpu.Pin.GPIO_Pin10)

Does this info help?

Yes, that helps immensely. Right now, you're using Cpu.Pin.GPIO_Pin10 (pin PA10 on the Netduino's MCU...which is pin A4 on the Netduino. What you want to use is Pins.GPIO_PIN_D10 -- digital pin 10 on the Netduino.

Try this:
StorageDevice.MountSD("SD", SPI.SPI_module.SPI1, Pins.GPIO_PIN_D10);
Please let me know if that works for you!

Chris

#5 Rik P.

Rik P.

    Member

  • Members
  • PipPip
  • 18 posts

Posted 26 March 2011 - 04:45 PM

Yes, that helps immensely. Right now, you're using Cpu.Pin.GPIO_Pin10 (pin PA10 on the Netduino's MCU...which is pin A4 on the Netduino. What you want to use is Pins.GPIO_PIN_D10 -- digital pin 10 on the Netduino.

Try this:

StorageDevice.MountSD("SD", SPI.SPI_module.SPI1, Pins.GPIO_PIN_D10);
Please let me know if that works for you!

Chris


Chris,

Awesome - that was it. Fixed that line of code, tested --- thanks for the help!

Rik.

---
Twitter: @rikp





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.