An unhandled exception of type 'System.InvalidOperationException' occurred in Microsoft.SPOT.Hardware.dll
Here's the code:
SPI.Configuration spiConfig = new SPI.Configuration(Pins.GPIO_PIN_D8, false, 250, 250, true, true, 1000, SPI.SPI_module.SPI1); SPI spi = new SPI(spiConfig);
What am I doing wrong?
EDIT:
I've been looking at this for a while now and I'm beginning to wonder if this error might indicate that there's a problem with the connection to the SPI device (or the device itself). The device is this flash memory board connected as follows:
CS# <-----> D8
SCK <-----> D13
SDI <-----> D12
SDO <-----> D11
I've also tried (unsuccessfully) connecting the BUSY# pin on the board to D7 and then specifying that in the other constructor overload:
SPI.Configuration spiConfig = new SPI.Configuration(Pins.GPIO_PIN_D8, false, 250, 250, true, true, 1000, SPI.SPI_module.SPI1, Pins.GPIO_PIN_D7, false); SPI spi = new SPI(spiConfig);
[N+ firmware v4.1.1.0 ALPHA7]