Skip to content

Commit

Permalink
[stm32] Fix off-by-one error in exti irq handler
Browse files Browse the repository at this point in the history
The lowest interrupt flag bit is not cleared correctly for interrupts
shared between multiple pins.

Co-authored-by: Sebastian Birke <[email protected]>
  • Loading branch information
chris-durand and se-bi committed Dec 17, 2021
1 parent c0a8c51 commit d2ac8d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modm/platform/extint/stm32/exti.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ public:
%% if (range | length) == 1
return 1ul << {{ range[0] }};
%% else
return ((1ul << {{range[-1]+1}}) - 1ul) & ~((1ul << {{range[0]+1}}) - 1ul);
return ((1ul << {{range[-1]+1}}) - 1ul) & ~((1ul << {{range[0]}}) - 1ul);
%% endif
%% endfor
}
Expand Down

0 comments on commit d2ac8d2

Please sign in to comment.