Skip to content

Commit a9fa694

Browse files
joverbeecmaglie
authored andcommitted
Reset sense bits before or-writing the new sense signature
Solve #199
1 parent af0263a commit a9fa694

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cores/arduino/WInterrupts.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ void attachInterrupt(uint32_t pin, voidFuncPtr callback, uint32_t mode)
8888

8989
// Configure the interrupt mode
9090
pos = (in - (8 * config)) << 2;
91+
EIC->CONFIG[config].reg &=~ (EIC_CONFIG_SENSE0_Msk << pos);//reset sense mode, important when changing trigger mode during runtime
9192
switch (mode)
9293
{
9394
case LOW:

0 commit comments

Comments
 (0)