G120 based custom board getting exception when attaching event handler to interrupt port

I am attempting to wire up an interrupt port to P2.21 on the G120. The port is created correctly, but throws an ArgumentException on wiring up the event handler. This code worked on a G80. Anyone have any suggestions?

        private static void TestRFID()
        {
            _rfidReady = new InterruptPort(G120.Gpio.P2_21, false, Port.ResistorMode.Disabled, Port.InterruptMode.InterruptEdgeLevelHigh);
            _rfidReady.OnInterrupt += _rfidReady_OnInterrupt;

            _rfid = new RFIDReader();

            _rfid.IdReceived += _rfid_IdReceived;
            _rfid.MalformedIdReceived += _rfid_MalformedIdReceived;
        }

        static void _rfidReady_OnInterrupt(uint data1, uint data2, DateTime time)
        {
            Debug.Print("RFID Interrupt!!");
        }

Does it fail with “Port.InterruptMode.InterruptEdgeBoth” as well ?

Edit :
[url]https://www.ghielectronics.com/community/forum/topic?id=22036&page=1[/url]

1 Like

@ Bec a Fuel - Thanks, it seems to work with all settings, EXCEPT the one I chose! :wall: