Main Site Documentation

InterruptPort.OnInterrupt exception @ Port 29 on EMX dev.board


#1

Hi all,

Can someone tell me why i do get an exception when attaching an oninterrupt method to interruptport 29 on my EMX dev.board.

Thanks in advance.

CODE:

var sensorInterrupt = new InterruptPort(EMX.Pin.IO29, false, Port.ResistorMode.PullUp, Port.InterruptMode.InterruptEdgeLow);

sensorInterrupt.OnInterrupt += sensorInterrupt_OnInterrupt;

Exception System.ArgumentException - 0xfd000000 (1)

Message:

Microsoft.SPOT.Hardware.InterruptPort::EnableInterrupt [IP: 0000]

Microsoft.SPOT.Hardware.NativeEventDispatcher::add_OnInterrupt [IP: 0027]


#2

Try casting the first argument to a Cpu.Pin


#3

The exception is raised after:
sensorInterrupt.OnInterrupt += sensorInterrupt_OnInterrupt;

The exception is NOT raised if i take another pin for example: EMX.PIN.IO0

I have the idea that the interrupt is internally reserved for COM3, but not sure


#4

According to the EMX Brochure and Pinout document, pin IO29 is NOT interrupt capable.


#5

Thanks !!