Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

Squintz

Member Since 20 Jul 2010
Offline Last Active Aug 30 2011 08:08 PM
-----

Topics I've Started

SPI Help

15 August 2010 - 09:44 PM

What about the following code is causing an exception to be thrown when I create a new SPI object? The exception says

#### Exception System.Exception - CLR_E_PIN_UNAVAILABLE (2) ####
#### Message:
#### Microsoft.SPOT.Hardware.Port::.ctor [IP: 0000] ####
#### Microsoft.SPOT.Hardware.OutputPort::.ctor [IP: 0006] ####
#### Microsoft.SPOT.Hardware.SPI::.ctor [IP: 004d] ####
#### NetduinoApplication1.Program::.cctor [IP: 0024] ####
A first chance exception of type 'System.Exception' occurred in Microsoft.SPOT.Hardware.dll
An unhandled exception of type 'System.Exception' occurred in Microsoft.SPOT.Hardware.dll

Uncaught exception
The thread '<No Name>' (0x2) has exited with code 0 (0x0).
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (1) ####
#### Message:
#### NetduinoApplication1.Program::Main [IP: 000b] ####
A first chance exception of type 'System.NullReferenceException' occurred in NetduinoApplication1.exe
An unhandled exception of type 'System.NullReferenceException' occurred in NetduinoApplication1.exe


        public static SPI.Configuration spi_config = new SPI.Configuration(Pins.GPIO_PIN_D13,
                                      false,
                                      1,
                                      1,
                                      true,
                                      false,
                                      15000,
                                      SPI_Devices.SPI1);

        public static SPI mySPI = new SPI(spi_config);

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.