hard20 pts · first answer countsmicrocontrollersinterruptsbit-manipulation
Clearing an EXTI flag with |=
The EXTI pending register on an STM32 is "write 1 to clear". An ISR clears line 3 with the code below. What bug can this cause?
void EXTI3_IRQHandler(void) {
EXTI->PR |= (1u << 3);
handle_line3();
}Discussion 0
Join free to post in the discussion.
Related questions
- Why use volatileEmbedded Systems Engineer
- Setting a register bitEmbedded Systems Engineer
- Keeping ISRs shortEmbedded Systems Engineer
- The interrupt vector tableEmbedded Systems Engineer
- Toggling an LED bitEmbedded Systems Engineer
- Doing heavy work in an ISREmbedded Systems Engineer
- printf inside an interruptEmbedded Systems Engineer
- What an open-drain output can doEmbedded Systems Engineer