Cobra II -> G120 port (disable SD)

I am porting an app prototyped on a Cobra II to its intended bespoke design using a G120. I was impressed with how easy this was to do in my last design using a G400-S. You make my life as an Engineer easy, and I love you for it!

The following exception is being thrown at startup.

The thread '<No Name>' (0x2) has exited with code 0 (0x0).
    #### Exception System.Exception - 0xffffffff (1) ####
    #### Message: 
    #### GHI.IO.Storage.SDCard::NativeConstructor [IP: 0000] ####
    #### GHI.IO.Storage.SDCard::.ctor [IP: 0029] ####
    #### GHI.IO.Storage.SDCard::.ctor [IP: 0005] ####
    #### GHIElectronics.Gadgeteer.FEZCobraIIEco::MountStorageDevice [IP: 0019] ####
    #### GHIElectronics.Gadgeteer.FEZCobraIIEco::.ctor [IP: 0097] ####
    #### ThunderboltDV.Program::Main [IP: 0004] ####
A first chance exception of type 'System.Exception' occurred in GHI.Hardware.dll
Using mainboard GHI Electronics FEZ Cobra II Eco version Rev B

I assume this is because the bespoke design is using P0.8/SD_CRS as an input. Is there a way to disable the SD functionality or must I be resigned to this exception being thrown whenever that input toggles? I’d like to avoid cuts & jumps on the PCB if possible.

1 Like

Please show us a minimal program that demonstrate the issue. I am afraid I did not understand the problem.

And thanks for the kind words :slight_smile:

Are you using the SD card in your bespoke design?

I see from the code that you are possibly using Gadgeteer as there is a call to MountStorageDevice?

If you switch to pure NETMF and don’t use the SD card then you should be OK to get this working. You could also remove the SD card from your project and then it should work.