Skip to content

Commit

Permalink
Merge pull request #5042 from DipSwitch/pr/fix_stm32_exti_clear_pending
Browse files Browse the repository at this point in the history
cpu/stm32/gpio_exti: EXTI->PR is of type RW_w1 so don't RMW the pending status register
  • Loading branch information
miri64 committed Mar 11, 2016
2 parents ae8e0ce + d72cdca commit 83c5424
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cpu/stm32f3/periph/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ void isr_exti(void)
uint32_t pending_isr = (EXTI->PR & EXTI->IMR);
for (int i = 0; i < EXTI_NUMOF; i++) {
if (pending_isr & (1 << i)) {
EXTI->PR |= (1 << i); /* clear by writing a 1 */
EXTI->PR = (1 << i); /* clear by writing a 1 */
exti_chan[i].cb(exti_chan[i].arg);
}
}
Expand Down
2 changes: 1 addition & 1 deletion cpu/stm32f4/periph/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ void isr_exti(void)
uint32_t pending_isr = (EXTI->PR & EXTI->IMR);
for (unsigned i = 0; i < GPIO_ISR_CHAN_NUMOF; i++) {
if (pending_isr & (1 << i)) {
EXTI->PR |= (1 << i); /* clear by writing a 1 */
EXTI->PR = (1 << i); /* clear by writing a 1 */
exti_chan[i].cb(exti_chan[i].arg);
}
}
Expand Down
2 changes: 1 addition & 1 deletion cpu/stm32l1/periph/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ void isr_exti(void)
uint32_t pending_isr = (EXTI->PR & EXTI->IMR);
for (int i = 0; i < GPIO_ISR_CHAN_NUMOF; i++) {
if (pending_isr & (1 << i)) {
EXTI->PR |= (1 << i); /* clear by writing a 1 */
EXTI->PR = (1 << i); /* clear by writing a 1 */
exti_chan[i].cb(exti_chan[i].arg);
}
}
Expand Down

0 comments on commit 83c5424

Please sign in to comment.