G120 Interrupt Exception thrown

I’m currently trying to port a working project from Cerb 40 II to G120 for production samples. I found that the interrupt “InterruptEdgeLevelHigh” and “InterruptEdgeLevelLow” throw exceptions. This is not a show stopper as I can use other trigger options except these two. However, just out of curiosity if this something GHI intentional disable or it just something wrong?

I’ve a short test code below that throw exception and the screen capture.

Thanks

using System;
using Microsoft.SPOT;

using Microsoft.SPOT.Hardware;
using GHI.Pins;
using System.Threading;

namespace TestInterrupt
{
public class Program
{
static InterruptPort int_pin = new InterruptPort(GHI.Pins.G120.P0_5, true, Port.ResistorMode.PullUp, Port.InterruptMode.InterruptEdgeLevelLow);

    public static void Main()
    {
        int_pin.OnInterrupt += new NativeEventHandler(int_pin_OnInterrupt);


        Thread.Sleep(Timeout.Infinite);
    }

    static void int_pin_OnInterrupt(uint data1, uint data2, DateTime time)
    {
        int_pin.ClearInterrupt();
        Debug.Print("Interrupted....");
    }
}

}

The level interrupts have never been implemented. Edge interrupts only.

1 Like

Thanks Mike