Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stm32] EXTI fixes #1066

Merged
merged 2 commits into from
Sep 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/modm/platform/extint/stm32/exti.cpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ Exti::handlers[Exti::Lines] modm_fastdata;
void Exti::irq(uint32_t mask)
{
uint32_t flags = EXTI->IMR{{"1" if (extended or separate_flags) else ""}} & mask;
%% if separate_flags
flags &= (EXTI->FPR1 & EXTI->FTSR1) | (EXTI->RPR1 & EXTI->RTSR1);
%% else
flags &= EXTI->PR{{"1" if extended else ""}};
%% endif
while(flags)
{
const uint8_t lmb = 31ul - __builtin_clz(flags);
Expand Down
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 @@ -268,7 +268,7 @@ public:
NVIC_DisableIRQ(IRQn_Type(vector));
}
template< class Pin > static void
disableVector(uint8_t priority) { disableVector(getVectorForLine(Pin::pin)); }
disableVector() { disableVector(getVectorForLine(Pin::pin)); }

inline static void
disableVectors(MaskType mask)
Expand Down