Exception on StorageDevice.MountSD in 4.1.1 BETA 1
#1
Posted 26 March 2011 - 11:13 AM
---
Twitter: @rikp
#2
Posted 26 March 2011 - 04:22 PM
#3
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
Posted 26 March 2011 - 04:36 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.
StorageDevice.MountSD("SD", SPI.SPI_module.SPI1, Cpu.Pin.GPIO_Pin10)
Does this info help?
Try this:
StorageDevice.MountSD("SD", SPI.SPI_module.SPI1, Pins.GPIO_PIN_D10);Please let me know if that works for you!
Chris
#5
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