FLASH Module v1.1 on Raptor

I have a flash module connected on my raptor on socket 3. When program starts I get an init exception:

Exception System.Exception - 0x00000000 (1)

#### Message: SPI bus 0 is already reserved, cannot instantiate it again.
#### Gadgeteer.Interfaces.NativeSpi::GetAndUseInstance [IP: 007a] ####
#### Gadgeteer.Interfaces.NativeSpi::.ctor [IP: 000e] ####
#### Gadgeteer.Interfaces.SPI::.ctor [IP: 0055] ####
#### Gadgeteer.Modules.GHIElectronics.FLASH::Initialize [IP: 001f] ####
#### Gadgeteer.Modules.GHIElectronics.FLASH::.ctor [IP: 0026] ####
#### Gadgeteer.Network.Wifi.Program::InitializeModules [IP: 0020] ####

A first chance exception of type ‘System.Exception’ occurred in Gadgeteer.SPI.dll
An unhandled exception of type ‘System.Exception’ occurred in Gadgeteer.SPI.dll
Additional information: SPI bus 0 is already reserved, cannot instantiate it again.

Been using the standard module dll, latest code download referencing the project in VS but still the same. Also using FlashFileSystem (codewarrior) isn’t working.

Any idea’s?

Thanks, Xavier

Do you have other S devices connected?

Yes, I have the wifi rs21 connected on socket 11. Goal, is to use the flash to store config settings for the wifi (amongst other settings)

Socket 3 and Socket 11 both use the SPI1 bus. The WiFi RS21 uses the SPI bus in exclusive mode so no other SPI device can be used on that same bus. Socket 1 uses the SPI2 bus, so you can put the WiFi RS21 there to work around its exclusivity.

Thanks John! It worked like a charm

Hello
I have same problem on raptor. it is about synchronize use of Ethernet-ENC28 and flash V1.1. I can’t connect Ethernet to socket 1 since same error will be shown. Is there anyway to use both Ethernet and flash module on Raptor?

@ Ehsan Ansari - Exclusive mode only locks the same SPI bus. Socket one does not share its SPI bus so you can use exclusive devices, like the ENC28, on that socket.

I have the same problem with FEZ Spider. I have the following connections:

  • usbClientDP (socket 1)
  • wifi_RS21 (socket 6)
  • display_T35 (sockets 10, 12, 13, 14)
    and I am getting the following exception:

An unhandled exception of type ‘System.Exception’ occurred in Gadgeteer.SPI.dll

Additional information: SPI bus 1 is already reserved, cannot instantiate it again.

Appreciate your help.

@ pkh - can you show your code?