Main Site Documentation

SdCard compatible?


#1

Hello everyone,

I want to know what Micro SD Card is compatible with Micro SD Card Rev 1.2 module and G120HDR 2.0 please?

I have a micro SD HC card 8GB Class 4 is good ?


#2

I saw on another forum:

default:
EMX: 9MHz
G120: 10Mhz
G400: 2Mhz
Cerberus: 10MHz
Hydra: 2.5MHz

Now I am G120HDR with a micro SD card speed 4MB / s

This means that the G120HDR does not support micro SD card?


#3

Your card should work without any issue! A card with a higher class will work slightly faster, but class 4 is OK. The default clock speed can be changed in the sd card.Mount() method but is not necessary. Setting a higher clock speed, as the default, has hardly any use.


#4

Ok thank you ! I think I found the problem


#5

@ Abarbosa As Rob says your microSD card should work.

I still think there is a bug somewhere in the file system code that causes issues when you start to use decent amounts of that storage. I have not yet had any success in reliably working with cards that contain more that about ~4GB of data.

https://www.ghielectronics.com/community/forum/topic?id=16524


#6

@ hagster - Isn’t it by design that FAT32 has a limit of 4GB?


#7

Now, I managed to make my card Detected but pointed me an error on this line of code: VolumeInfo.GetVolumes () [0] .IsFormatted
"System.IndexOutOfRangeException"

This means that my micro sd card is not compatible?


#8

Yes is formatted FAT32 with my computer


#9

@ andre.m - Here is the code I have for testing.
The problem appears to VolumeInfo _vol = new VolumeInfo(“SD”);

I specify, I use the mainboard of G120HDR v2

In the output windows : #### Exception System.IO.IOException - CLR_E_VOLUME_NOT_FOUND (5) ####
#### Message:
#### Microsoft.SPOT.IO.VolumeInfo::.ctor [IP: 0000] ####
#### GadgeteerApp1.Program::CheckSDCard [IP: 0012] ####
#### GadgeteerApp1.Program::Button_OnInterrupt [IP: 0004] ####
Une exception de première chance de type ‘System.IO.IOException’ s’est produite dans Microsoft.SPOT.IO.dll
sdCard.IsCardInserted =true;
sdCard.IsCardMounted =true;
Not compatible


#10

So given this is related to the G120HDR which doesn’t have the F socket wired up, I personally suspect that your problem is hardware not software. Check your wiring and look for bad solder joints, solder bridges etc as well as triple check you’re using the right pins to the right places.


#11

@ Brett - Yes of course, I thought about her except that I’ve tested everything and it detected the card properly.


#12

@ hagster - You think this is due to the size of the map is larger than 4Gb? Is because in case, I ordered another card so that it can work.


#13

I tried with a 2GB micro sd card I have the same problem.


#14

@ ABarbosa -

You can try a smaller or different card, but I don’t think the sdcard size and speed cause your problem.

please give a try with non-gageteer C# code below to see if it work or not.

static void main()
{
      PersistentStorage sdPS = new PersistentStorage();
      sdPS.MountFileSystem();
      VolumeInfo vol = VolumeInfo.GetVolumes()[0];
      Debug.Print("Formating...!");
      vol.Format("FAT", 0);
     Debug.Print("Formatted!");
       
}

#15

@ Dat - what is a namespace for PersistentStorage ?


#16

I see you are using 4.2 so it should be

GHI.Premium.IO


#17

@ Dat -it should last a long time “Formatting …” ?


#18

it can be. few mins or more depends on the size.

But should not be 1 hours :)). Try to wait, there should be done or exception.


#19

And if you have time, try to use 4.3 there is support changing the SD Clock that can be more flexible when doing with SD.


#20

@ Dat - Perfect, I tried your code it in perfectly, but back on my program I unfortunately have the same problem