Hi,
In my PandaII project, I’ve added a simple class “SomeClass.cs”:
using System;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using GHIElectronics.NETMF.FEZ;
namespace InterruptTest2
{
class SomeClass
{
private InterruptPort _MyInterruptPort = new InterruptPort((Cpu.Pin)FEZ_Pin.Interrupt.Di42, false, Port.ResistorMode.PullDown, Port.InterruptMode.InterruptEdgeBoth);
public SomeClass()
{
_MyInterruptPort.OnInterrupt += new NativeEventHandler(_MyInterruptPort_OnInterrupt);
}
private void _MyInterruptPort_OnInterrupt(uint data1, uint data2, DateTime time)
{
Debug.Print("You should not see this message.");
}
}
}
In “Program.cs” I instantiate the class:
using System;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using GHIElectronics.NETMF.FEZ;
namespace InterruptTest2
{
public class Program
{
public static void Main()
{
SomeClass someInstance = new SomeClass();
Thread.Sleep(Timeout.Infinite);
}
}
}
I’ve run the program on 2 different FEZ Panda IIs now, yet I get the same output. Namely, the interrupt handler seems to always fire, printing the message “You should not see this message.” even though I set InterruptMode to InterruptNone. Does anyone know why?
Here’s the SDK/firmware info:
SDK Version 1.0.17
October 06, 2011
Pinging… TinyCLR
HalSystemInfo.halVersion:
HalSystemInfo.halVendorInfo:
HalSystemInfo.oemCode: 0
HalSystemInfo.modelCode: 0
HalSystemInfo.skuCode: 0
HalSystemInfo.moduleSerialNumber:
HalSystemInfo.systemSerialNumber:
ClrInfo.clrVersion: 4.1.2821.0
ClrInfo.clrVendorInfo: Microsoft Copyright © Microsoft Corporation. All rig
ClrInfo.targetFrameworkVersion: 4.1.2821.0
SolutionReleaseInfo.solutionVersion: 4.1.7.0
SolutionReleaseInfo.solutionVendorInfo: GHI Electronics, LLC
SoftwareVersion.BuildDate: Sep 28 2011
SoftwareVersion.CompilerVersion: 410561
FloatingPoint: True
SourceLevelDebugging: True
ThreadCreateEx: True
LCD.Width: 0
LCD.Height: 0
LCD.BitsPerPixel: 0
AppDomains: True
ExceptionFilters: True
IncrementalDeployment: True
SoftReboot: True
Profiling: False
ProfilingAllocations: False
ProfilingCalls: False
IsUnknown: False
Thanks!