var int0 = GpioController.GetDefault().OpenPin(SC20260.GpioPin.PF10);
int0.SetDriveMode(GpioPinDriveMode.InputPullUp);
int0.ValueChangedEdge = GpioPinEdge.FallingEdge | GpioPinEdge.RisingEdge;
int0.ValueChanged += Interrupt0_ValueChanged;
...
static void Interrupt0_ValueChanged(GpioPin sender, GpioPinValueChangedEventArgs e)
{
if (e.Edge == GpioPinEdge.FallingEdge)
{
// Pin went low
// event does not occur!!!
}
else
{
// Pin went high
// event does not occur!!!
}
}
I tested this with the App button on the Portal board. Works.
And in my real project it works if int0.ValueChangedEdge = GpioPinEdge.FallingEdge;
My test used PF10, same as yours and seems work to me, and other pins work as well. So I don’t think firmware issue.
Is it custom board? Do you have any other boards to test PF10?
Multiple interrupts defined for Px10?
not defined. I have only one custom board.