I am having trouble understanding how gpio configuration works for interrupts.
My issue is that I have applied the same configuration to two different pins, run the same tests on both of them, but I am seeing different results between the tests.
The pins that I am testing are colibripin 81 and colibripin 102.
Reading the configuration back using Gpio_GetConfigString() I get the following:
81 – dir=in, lvl=1, altfn=5, pull=up, strength=6, outmode=std, inmode=schmitt, slew=slow, speed=rsvd, irqtrig=low, sion=normal
102 – dir=in, lvl=1, altfn=5, pull=up, strength=6, outmode=std, inmode=schmitt, slew=slow, speed=rsvd, irqtrig=none, sion=normal
Both pins appear to have identical configuration.
When the test application initialises it configures one of these pins to detect an interrupt. After the test application initialises it waits for an interrupt to be triggered. Once one has been detected the pin state is read and a counter is incremented.
Variation 1:
The interrupt source is generated by switching colibri pin 104 from a separate application. It is switched with a period of 200mS and connected to the pin under test via the gpio breakout headers on the evaluation board.
Variation 2:
The interrupt source is generated by connecting a signal generator outputting a square wave with a period of 200mS to the pin under test via the gpio breakout headers on the evaluation board.
Results:
When testing pin 81 with variation 1: Roughly 5 interrupts per second are recorded in the application.
When testing pin 81 with variation 2: Roughly 5 interrupts per second are recorded in the application.
When testing pin 102 with variation 1: Roughly 5 interrupts per second are recorded in the application.
When testing pin 102 with variation 2: Thousands of interrupts per second are recorded in the application.
I have two questions:
1 - Is there some configuration for the gpio that affects the ‘sensitivity’ for detecting an interrupt?
2 – Given that the configuration is the same for pins 81 and 102, why am I not seeing the same behaviour when testing them both while using the signal generator as the source?