diff --git a/cores/arduino/WInterrupts.c b/cores/arduino/WInterrupts.c index 70d9acd017d9b456be47b0256af2f1b9ceec2ae5..5a2d8b9ed8cee92efc6f0f459d0eba0c8f05b601 100644 --- a/cores/arduino/WInterrupts.c +++ b/cores/arduino/WInterrupts.c @@ -88,6 +88,7 @@ void attachInterrupt(uint32_t pin, voidFuncPtr callback, uint32_t mode) // Configure the interrupt mode pos = (in - (8 * config)) << 2; + EIC->CONFIG[config].reg &=~ (EIC_CONFIG_SENSE0_Msk << pos);//reset sense mode, important when changing trigger mode during runtime switch (mode) { case LOW: