Main Site Documentation

SD card expansion with Panda


#1

I get the below exception on the “new PersistentStorage” line from the beginner guide. I also get this same error when the board isn’t connected at all. The SD card is formatted as FAT and readable in windows. I tried searching the forum but the new search is really, really bad.

#### Exception System.Exception - 0xffffffff (1) ####
#### Message: 
#### GHIElectronics.NETMF.IO.PersistentStorage::.ctor [IP: 0000] ####

#2

Is your firmware and sdk in sync?


#3

Yes and I have multiple other more complicated projects such as serial cameras, sensors, etc. working fine.


#4

Also this line correctly pritns true when it is connected and false when it is not:

Debug.Print(PersistentStorage.DetectSDCard().ToString());

I’ve tried reformatting the SD card as FAT32 but that appears to not have an effect.


#5

Getting closer… If I pop out the card and then pop it right back when it gets to the new PersistentStorage line, it makes it past that line but doesn’t show as formatted or any other volume info except that it is “\SD”.


#6

Check this thread:

http://www.tinyclr.com/forum/2/2061/


#7

Tried a couple capacitors to no avail, also tried a 9v battery on Vin with same result. Guess I’ll just try some different SD cards until I find one that works.


#8

Try to format you card with different allocation units.


#9

I tried it with all available options for FAT16 and FAT32, all with the same result. Since the SD card is detected correctly but it is just the persistent storage constructor that fails to initialize, I have a theory:

When I put the SD card in my computer it takes 10-12 seconds for it to initialize and show up in explorer. The PersistentStorage constructor blocks for about 2-3 seconds and then gives the exception though. So I wonder if a higher timeout for its wait time may support more SD cards… just a guess.

Is the source for the PersistentStorage class available?


#10

These are different issues that have different solutions.
If you get exception at new PersistantStorage() then there are bad communications with SD card or it is unplugged.
If you get problems afterwrds,
make sure your firmware is up to date,
next formatthe SD card oncomputer and plug it into FEZ. Try our example as-is with no changes. It should work.


#11

Can you try another SD card? seems this one is bad…


#12

The card isn’t “bad” it just takes longer to initialize so I do think it is possible to get this working with a larger variety of SD cards. That being said, I went and bought 4 or 5 different kinds at the store and found a patriot 2GB that worked and returned the rest. This one does startup much faster in windows as well, almost as soon as it is put in the SD card slot.


#13

I have four computers, I use them for different things. However! I have a panda set up (now) as a Mass Storage device… the initialise time is different on each one 12 seconds typically on the main one, only 4 seconds for my secondary one. It appears to be on the PC end aswell…

Cheers Ian


#14

I got the same problem as you… How did you get it working?

Best Regards
Thomas Jespersen


#15

Try different SD cards, make sure the headers are all connected properly to the pins on the Panda.